1

I am working with a client to update a current wordpress site. I do not have access to the actual Wordpress install because they are behind a VPN that I'm not able to get behind for various reasons. They have sent me a download of all the wordpress files on their server as well as a .sql file of their database and a .tar file with all of their media files.

I have only ever used a local environment to build a site and then move it to a live build, I have never had to import a live site into a local environment this way.

Can someone please help me understand what to do? Do I create a new WP install on my local host and then import somehow, or do I need to start with a fresh, empty server and move all of my files over manually?

Thanks in advance.

  • It's usually the same steps. Extract WordPress files, import database, modify the home and siteurl from the options table, modify wp-config.php for new database credentials, set WP_DEBUG to true, etc... – RRikesh Jan 21 '15 at 7:06
  • I forgot about the options table! I kept getting a database error, even after changing wp_config. I forget about the other side of the equation. Thanks for jogging my memory... – Eckstein Jan 21 '15 at 7:12
  • 1
    You can also install Velvet Blues Update URL's which will replace all old URL's. Also, remember to flush your permalinks otherwise images will not show up – Pieter Goosen Jan 21 '15 at 7:21
2

The steps to take would be:

1 - Extract files

2 - Create DB and import

3 - modify wp-config.php for database name and user credentials if changed

Do not modify db tables to change the site url as they are serialized and this will create more issues than you want to deal with.

4 - Use a script like searchreplacedb.php to search and replace all of the urls in the database with the new url.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.