admin管理员组

文章数量:1405757

I am trying to migrate a production Wordpress site to a localhost install on MacOS using MAMP pro. What steps do I need to preform to enable this.

I have the data base configured and connecting.

I am able to hit localhost:8888/readme.html and get served the Wordpress readme from Apache.

Unfortunately If I hit http://localhost:8888 or http://localhost:8888/index.php I get a 301 redirect to http://localhost The port is dropped and nothing gets served.

I am unsure where this 301 is coming from and currently blocked on this

Additionally when I access http://localhost:8888/wp-admin I am redirected to the production site at

It seems there are multiple steps to consider in this migration and I am looking for a complete answer.

I am trying to migrate a production Wordpress site to a localhost install on MacOS using MAMP pro. What steps do I need to preform to enable this.

I have the data base configured and connecting.

I am able to hit localhost:8888/readme.html and get served the Wordpress readme from Apache.

Unfortunately If I hit http://localhost:8888 or http://localhost:8888/index.php I get a 301 redirect to http://localhost The port is dropped and nothing gets served.

I am unsure where this 301 is coming from and currently blocked on this

Additionally when I access http://localhost:8888/wp-admin I am redirected to the production site at http://www.productiondomain/wp-admin

It seems there are multiple steps to consider in this migration and I am looking for a complete answer.

Share Improve this question edited Dec 11, 2019 at 3:23 kevzettler asked Dec 10, 2019 at 0:03 kevzettlerkevzettler 616 bronze badges
Add a comment  | 

1 Answer 1

Reset to default 1

Out of the box Mamp runs different ports. Are you able to change it to port 80 or are you restricted to doing that for some reason?

If you are able to, change the port to port 80.

mamp->preferences->ports and change Apache port to 80 and then restart services

UPDATE: For the wp-admin that will be because in your database your site and homepage urls are set to the live version.

You can override it in wp-config.php by adding the following to the bottom of it:

define( 'WP_HOME', 'http://localhost' );
define( 'WP_SITEURL', 'http://localhost' );

OR if you want to edit directly to the database. Go into your local database and go into wp_options and change the options in there for wp_home and _wpsiteurl

本文标签: redirectHow to migrate production Wordpress to Localhost