You’re half-way through our video series for our new Plesk WP Toolkit Course. Congrats! Now join us because this time we’ll check out the staging and production feature you’ll find in the Plesk WP Toolkit. Our mission is to help answer your WordPress questions in this video short.Note that this and more Plesk courses are available for free in the Plesk University Catalogue. Ready to start the course? Click below! Or watch these speedy video tutorials first.
Staging and Production in the WP Toolkit Course
So we’ve developed the Plesk WP Toolkit Extension in order to help you deploy, secure and update your WordPress website in the fastest and easiest way possible. Then, we launched our WP Toolkit course to give you the knowledge to do so. In part 3 of our video series, we have two quick tutorials on the Toolkit’s Staging and Production element.
For most businesses, it’s crucial to have a website working 24/7. So what do you do when you need to make changes? In such cases, you should create a staging environment. This is a full copy of your production website where you can experiment without the risk of breaking your public website.
Video 1: Creating a Staging Environment
Video: 1:17 minutes
Below, you’ll see how you can test new code or features on your WordPress site. Like update the website’s theme, install and test a new eCommerce plugin, or revamp the main page. And without having to code live too!
To create a staging environment, you typically need to:
- Copy files of your WordPress instance to a staging domain (or subdomain)
- Create a copy of the production website’s database.
- Update the configuration of your staging instance to use the copied database.
What’s Going on in this Video
1. Click Clone on your production website.
2. By default, WP Toolkit will create or use an existing subdomain with the “staging” prefix.
3. However, you can choose the name for the staging subdomain or create a new domain for your staging environment.
4. Start cloning. The process is automatic and quite fast. WP Toolkit copies files and the database to the new domain and configures it all to work together.
5. After you create the staging environment, it’s a best practice to change the following settings:
- Disable search engine indexing. You don’t want your work-in-progress to appear in Google top results, do you?
- Enable debugging and logging. If you’re testing new code, it will help you to troubleshoot any potential issues.
- Turn on password-protected access. If you’d like to limit access to work-in-progress only to specific reviewers, enable password-protected access.
And you’re done. You can experiment with new code, test new plugins, revamp your website theme, or rebuild content without affecting your production website. Then, once you’re satisfied with your experimentation’s results on the staging site, it’s time to apply them back to production.
Video 2: Applying changes to the production website
Usually, you would put the production website into “maintenance mode” so that the synchronization procedure is not interrupted by a site visitor. Then, copy new and changed files from the staging to the production website. And finally, copy new tables from the staging database to the production database.
What’s Going on in this Video
1. First, click “Sync” on your staging website.
2. And select your production website from the “Target WordPress website” drop-down.
3. Select what you want to sync. Be it files if you worked with code, database if you made changes to content or configuration, or both if you installed new plugins/updated loads of content.
4. Before the sync starts, Plesk lets you create a restore point. We strongly recommend this. Because if something goes wrong, you’ll be able to roll your production website back to the last working version.
5. After the synchronization is finished, go to production website to verify everything works.
6. Finally, delete your restore point, or roll back to it if something went wrong.
10 Comments
Thanks for sharing what i was looking for
Will this write over data such as woocommerce order data?
Hey Gage!
Sync back from staging to production will overwrite the production’s database (or its parts) if you choose either “All tables” or “Selected tables” option during synchronization. But if you choose “New tables”, then the existing data on production will not be overwritten.
Hi Debbie,
are there any testcases done by plesk in a real world setup of a woocommerce store with this? As woocommerce writes data into tables that are shared with other plugins or the wordpress core I do not think that “New Tables” does solve this, right?
Same goes for serialized data, right?
Thanks!
Sascha
Hi Sascha,
Woocommerce actually writes data into the same database as other plugins, but does not write data into the same tables. Instead, Woocommerce will create its own tables inside the WordPress Database in order to store all its data.
Hopefully that clarifies it for you, Sascha. For more information you can have a quick look at Woocommerce’s Installed Database Tables.
Thanks for sharing this useful article, here’s the guide that helps you to create a staging environment in WordPress: http://www.cloudways.com/blog/create-staging-sites-for-wordpress/, With the help of staging you can work on a live version of your website on another platform where your live website won’t disturb.
Hi. The cloning fails with:
Copying database
Error
Unable to import database. Error message: ERROR 1227 (42000) at line 3930 in file: ‘/var/www/vhosts/skinfitness.com.sg/.wp-toolkit/204/db_204_x5u6l.sql’: Access denied; you need (at least one of) the SUPER privilege(s) for this operation ERRO …
This article says that it will be fixed in a future release – any advice on when?
https://support.plesk.com/hc/en-us/articles/115002731813–BUG-Unable-to-clone-a-WordPress-instance-that-contains-VIEW-with-a-database-user-as-DEFINER-in-its-database-Access-denied-you-need-at-least-one-of-the-SUPER-privilege-s-for-this-operation
Paul
Hi Paul! We are planning to fix this by the end of summer 2020.
Hi, I can copy from my staging to production without any error message. But I don’t see any changes took place. For example, I’m changing the color theme in staging, however, when I copy to production. Nothing happened. Is this something expected? Thanks
Hi Arif,
That sounds rather unexpected! We kindly suggest you submit a request with our Plesk support, as they can have a look at your specific situation.