0

I want to host a wordpress site locally on my MAMP server. This is the procedure I followed: 1.Installed the duplicator plugin on the site and created the site package. 2.Downloaded the installer and archieve file and installer.php file from package. 3.Created the database in phpmyadmin using the MAMP server. 4.Moved the archieve file and installer in a folder in MAMP/Applications/htdocs. 5.Tried opening localhost/foldername/installer.php.

After following all these steps getting the error and not able to run it locally. wordpress already installed at local host. Suggest the solution to this problem.

1 Answers1

0

You can copy a site to localhost in an alternative way without using any extra plugin.

Steps:

1. Export the database using phpmyadmin interface and save that as a .sql file.

2. Extract wordpress.zip file downloaded from wordpress.org to MAMP/htdocs.

3. Copy wp-content folder and wp_config.php from old site and Paste it under new wordpress folder.(Replace the files)

4. Create a database in new host with same database name and import the .sql file.

5. Goto localhost:8888 in your browser. (Before this, you need to change document root to this wordpress folder by using preferences in MAMP) You will get your site.

Notes:

If you find any old urls in your site, (Broken urls to media items) You can do a search and replace in database using the following sql queries. Do this one by one inside your wordpress database.

UPDATE wp_posts SET guid = replace(guid, 'http://old-site','http://new-site');

UPDATE wp_posts SET post_content = replace(post_content, 'http://old-site', 'new-site');

UPDATE wp_postmeta SET meta_value = replace(meta_value,'old-site','new-site');
Samad
  • 1