Set Up a Staging Environment
- If you used WordPress 3.0.x or earlier on your site, download the GUID Fix Plugin and follow the GUID Fix Plugin documentation to add and run the plugin on your production site before setting up your staging server. After GUID Fix has been successfully run it is not recommended to run the plugin again and should be removed from your plugin directory.
- Set up a web environment with the same plugins and themes, uploaded files, etc. as your production environment
- You can pull the files as a checkout from a source control systen (Git, SVN, etc. – recommended) or you can transfer them via FTP, SCP, etc.
- Its important to make this folder password protected so that no one (i.e. user or search engine) can access your staging environment (make sure to enable access for RAMP)
- Perform an SQL dump from the production site
- Import the SQL dump into the staging site
- Set up the wp-config.php file for your staging site
- Enter the correct database settings
- For WordPress single site you can set the
WP_SITEURLconstants to set the site URLs (to avoid having to update the settings in the database)
- For WordPress MultiSite you will need to perform a few additional steps to setup the staging database correctly:
- In the wp_blogs table, edit the domain and path columns for each site to your staging sites’ domains and paths
- In the wp_options and wp_%_options tables (one table for each site), edit the rows with option_name “siteurl”, “home”, and “fileupload_url” to each staging site’s URLs
- Visit your staging site(s) and make sure things are working as expected
- Install and activate RAMP on your staging site