简体   繁体   中英

wordpress site copy to local machine

I am using linux.

i have a server for my wordpress site The name of the site example.com {name is not real but for example).

i copied the entire directory example.com from the server to my computer. the folder example.com has wp-config.php, wp-admin folder etc. Basically all the files of the site.

i also exported and imported mysql databe to my local mysql server.

Now how to configure my apache conf file and hosts file so that when i type example.com it should open my local website.

Presenlty i stored example.com in /user/home/public_html/example.com

Assuming that your wp config has been modified to match your local server settings, all you need to do explained in this answer . Don't forget to restart your apache service!

  1. Open wp-config.php and set its credentials according to your local server.
  2. Then import database to phpmyadmin.
  3. Then use http://interconnectit.com/products/search-and-replace-for-wordpress-databases/ to find and replace all your urls.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM