I have a local WordPress install that I am using to test a new theme out. When I initial set up the local site I was able to import my database and media content. However that was a few months ago. Since then my live site has new content that I need to have in my local site.

How do I go about updating my local install with the latest content? Will I need to import the database again or just somehow export and import my latest posts? Any help or suggestions would be appreciated.

1 Answer 1


My best practice to run a production system and keep a development version with a simple and easy configuration. Notice: This works super awesome on small wordpress websites.

  • Create production and development configuration files:

    • wp-config-dev.php (contains local database configuration, site url and debugging)
    • _wp-config-live.php (contains production database config., live site url and disabled debugging configuration)
    • Modify wp-config.php:

    // Insert before: require_once(ABSPATH . 'wp-settings.php'); /** Production server configuration */ if(file_exists(ABSPATH . 'wp-config-live.php')) { include_once(ABSPATH . 'wp-config-live.php'); } /** Development server configuration */ else if(file_exists(ABSPATH . 'wp-config-dev.php')) { include_once(ABSPATH . 'wp-config-dev.php'); }

  • Keep the whole development wordpress site under version control (except for wp-content/upgrade/, wp-content/uploads and wp-config-live.php).
  • If I need to import the production website data into the development system I download the whole wp-content/uploads directory and the whole database dump. In the database dump I usually replace the production site url with the development site url.
  • Thanks. How do you import if the sites are using two different themes. Wont importing the database overwrite the theme settings to what the production site has?
    – user310142
    Jan 1, 2015 at 20:26
  • It may overwrite the settings. So I recommend to update your development/test data, before doing any changes to settings, plugins, themes design and so on. Usually there are not many theme settings, so you could set them again afterwards. If you did any changes to style.css or other theme files, these would not be overwritten.
    – malisokan
    Jan 2, 2015 at 15:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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