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!
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.