There are a few important things to remember when working with staging sites:
- There is no server side caching in place on staging sites
- Only the current year’s /uploads and /blogs.dir are copied
- There are some plugins that should not be used in the staging area
- There are no backup points or daily backup checkpoints in the staging area
Plugins that may have issues in the staging area are generally connected to third-party services or validate licenses through their domain. In this case, you may need to purchase two licenses to ensure similar functionality between your live and staging sites, or add the [installname].staging.wpengine.com domain to the license. You can also contact the author of your plugins for more information.
How to create a staging site
To create a staging environment, follow these steps:
- Go to your WordPress Dashboard (yourdomain.com/wp-admin or installname.wpengine.com/wp-admin).
- Click on the WP Engine logo on the side bar located at the top left corner.
- Select the “Staging” tab
- Click “Copy site from LIVE to STAGING.”
Your will now be copied to the staging area and a green box will pop-up showing the status of the task. Please note that the duration of this process will depend on the size of your site. The larger the site, the longer it will take to copy.
If you already have a staging area, clicking the “Copy site from LIVE to STAGING” button will overwrite it. Please be very careful when copying to staging as there are no backups. WP Engine Backup Points only cover the Live site.
The URL structure for every staging area appears as follow: http://account_name.staging.wpengine.com
You can access the staging area by simply logging into the admin for your live site, i.e.: http://installname.staging.wpengine.com/wp-admin
All existing users and user meta information will be copied from live to staging and everyone can log into the staging site with the same credentials used in the live site.
The staging area can only been by users that have the staging URL. Robots.txt is set to “disallow all” for the Staging area.
Access the staging site’s database
You can access to the staging site database in the same way that you access the live site’s database. In the User Portal, click PHPMyAdmin for the proper install. Then, once inside PHPMyAdmin, select the database labeled “snapshot_installname”. This is your staging database.
Note: The database “wp_installname” is the database for the live site. Any changes you make to this database will affect the live site.
Please read over this article for additional information on accessing your database:
To access your staging site’s files via SFTP, you will use the same process as you would on your live site, except you’ll use the staging user credentials that are setup in the User Portal.
You can also edit any existing SFTP user’s settings and change the “Environment” to “Staging”. For additional information on logging in via SFTP, please see this article:
Copying the staging site to your live site
If you’ve made changes to the staging site and want to push those changes to the live site, you can do so with the click of a few buttons. After logging into your live site’s /wp-admin click the WP Engine button on the top left hand side. Then, click the “Staging” tab.
You will now see a black button labeled “Copy site from STAGING to LIVE”. Click that button. It appears as follows:
Then, you will be prompted with a dropdown menu that appears as follows:
This dropdown menu will allow you to select all, none, or specific database tables from the staging area to the live site. If you select all tables, any new posts, pages or users changes made to the live site during your work in the staging area will be overwritten.
If you want to push all changes, except for pages, posts and users to your live site, select all database tables except wp_posts, wp_postmeta, wp_users and wp_usermeta. If you push no database tables, only changes to theme files, core WordPress files and plugin files will be pushed to the live site.
This covers the essential functions of the staging site. If you need any additional support, please check our Support Garage for relevant articles or use the “Support” button from within your User Portal to contact our technical support team.