This is a simple but very useful tutorial. I’ll show you how you can avoid the situations when installing new plugins or updating your plugins or updating WordPress version breaks your site. This method works perfectly for huge websites too. It’s easy and free.
It’s the best free way I know so far if your hosting does not offer staging environment for you.
- Making WP updates and plugins installs and updates safe: peek under the hood
- What’s the process of testing if plugins installs or updates and WordPress updates don’t break your website?
- 1. Install WP Staging plugin
- 2. Click “Create new staging site”
- 3. Specify what database tables, files or folders you want to exclude in your staging site
- 4. Click “Start cloning” button
- 5. Test on the staging site: install new plugins, update plugins, update theme, update WordPress etc
- 6. Make changes on your live site with no fear of breaking anythng
- 7. Remove staging site or leave it till the next tests
Although it’s generally recommended to update your plugins, themes and WordPress version as soon as possible to avoid security issues, it’s not that safe to do so. Updating your website software may result into breaking your entire site or parts of it because of new conflicts between plugins, themes and your WordPress version.
There’s a simple way how to make sure nothing will break if you update your plugins, themes or WordPress. Its essence is in testing updates on a functional clone of your website which is available only for administrators of your website. However, if you want to create a complete clone of your not large website which would be available for anyone (on a separate domain or subsomain), this article may help you.
Now back to our method. It allows creating a sort of staging environment for your WordPress site. I will explain below and you’ll see that it does not require any technical skills, new domain, subdomain or money. You don’t even need to have a lot of disk storage on your hosting for doing that. And the sweet part is that it’s easy as pie (actually, as easy as clicking a couple of times).
And if your host does not offer such staging option, this tutorial is for you. And the secret weapon I’ll be talking about below is a free and sweet WP Staging – DB & File Duplicator plugin for WordPress.
A very nice feature of this tool is the option to easily exclude not important database tables, files and folders when cloning your website into a staging area. This makes it possible to create clones to test if installing new plugins, updating plugins, updating themes and WordPress version are safe for your website even if it has a huge size.
Making WP updates and plugins installs and updates safe: peek under the hood
There are two things you need to know about what this plugin does when it creates a clone of your website:
- It simply creates a copy of your databases (you can exclude tables if you want).
- It creates a subfolder in your WordPress installation folder and copies there files and folders of your WordPress and other custom folders. (You can also exclude folders and files if you want from being copied.)
This is enough to let you test if installation of new plugins or update of plugins, themes and WP core are harmless for your website.
However, please note, that first you need to make sure on your staging (cloned) website that you can install new plugins or update plugins or WordPress version without issues. And then you need to repeat installing or updating the software on your live (production) website. In other words, you can’t push the changes back to you live website from the staging site.
What’s the process of testing if plugins installs or updates and WordPress updates don’t break your website?
Below I’ll demonstrate the process in details.
Here’s the whole process from A to Z how you create a staging site easily and test there plugins, themes, WordPress updates etc:
- Install WP Staging plugin.
- Click “Create new staging site”.
- Specify if you want to exclude database tables, files or folders (useful to deal with huge websites or simply to make the process faster).
- Click “Start cloning” button to create a staging site.
- Go to a new staging site’s WordPress administrator dashboard (1-click action). And do your tests on the staging site: install new plugins, update plugins, update theme, update WordPress version and do other changes if you need.
- After you make sure the updates/installing did not break anything on your staging site, you can make necessary changes on your live website with no worries. These changes will not break anything now (install plugins, update plugins, theme, WordPress version etc).
- You can remove the staging site. Or you can leave it till next time when you want to test installation or update of plugins, themes or WordPress version on this staging site.
Every step above is super simple. However, no.3 (Optional excluding database tables, files for folders) may cause issues if you are not sure what you do. Read below for more details how to deal with it.
1. Install WP Staging plugin
Nothing special. Just install and activate the plugin as you usually do with any WordPress plugin:
No further settings are needed. However, there are settings page for the plugin in case you need to tune the plugin’s performance or change some default settings.
2. Click “Create new staging site”
Simply go to WP Staging section in your WordPress dashboard and click “Create new staging site” button:
3. Specify what database tables, files or folders you want to exclude in your staging site
If your website is small (up to a hundred megabytes), then you can just skip this section.
Anyway, the maximum size of your website that WP Staging can handle depends actually on your hosting power. Problems may usually start with websites more than 500 MB hosted on a shared hosting.
In general, the bigger website, the longer the process of creating a staging site.
Also, in a restricted shared hosting environment the process of creating staging site may fail because of too heavy or long process. This is a typical problem that website backup and clone plugins face on a shared hosting. The major issue is a big size of your website.
And so, there are more risks that your hosting may automatically stop the process of creating your large staging site halfway. It can unlikely break your original site, but it can leave data garbage in your website.
Therefore on a typical shared hosting it’s recommended to keep a staging site as small as possible to let WP Staging plugin run fast and flawlessly.
In other words, it makes sense to optimize the process of creating a staging site by excluding some parts from inlucding into your staging website. It will allow you make the whole process much faster and less risky.
That’s why in case of large websites I’d recommend excluding some parts from your staging site to make your staging site much smaller. WP Staging plugin allows doing it on a simple level and now I’ll show you how.
3.1. Excluding database tables from being included in a staging site
The database is usually not the biggest part of your website. So, including all database tables is fine.
By the way, on the image above you can see that you can specify the name for your new staging site. I’ll leave it blank to see what name it generates by default.
3.2. Excluding files and images from a staging site
The biggest part of your website is usually the uploads folder where all your images are located. If you exclude this folder from your staging site, it will not affect the functionality of your stagin site. And you will be able to test new plugins, update plugins, themes or WordPress version as well.
Also, it’s a good idea to exclude other folders that you don’t need in your staging site, especially if they take a lot of disk space. In my case it’s a folder (bps-backup) with database backups that are automatically created with BPS security plugin.
For example, here’s an example of what file folders I exclude when creating a new staging site:
Of course, if you exclude upload folder, you will not see images on your staging site. There will be empty areas instead of the images on your staging site. But in most cases you don’t need images to test new plugins or updating plugins and other software on your WordPress site.
3.3. Including some images into a staging site
However, there may be cases when you really need images to be included in your staging site. For example, you want to test design-related things such as a gallery plugin or a new WordPress theme. In this case you may include just some selected images or subfolders with images instead of including all the images.
Here’s an example of including to a staging site only the latest images which I’ve uploaded to my website just recently. In this case I will see images in my latest posts on a staging site (I assume the images uploaded only during year 2017 can be enough for what I may want to test):
These tactics will let you create a staging site fast and flawlessly even on restricted shared hosting. And you’ll be able to test plugins, themes and WordPress versions efficiently.
As simple as it says – just click the “Start cloning“ button to create a staging site:
A new staging site will be created:
Note that no database has been created, but new database tables have been added. And files for the new staging site have been added to a subfolder in my WordPress installation folder. In this case the subfolder’s name was generated as 1488583707022 (it could be specified to a more friendly one before creating staging site – see image here).
5. Test on the staging site: install new plugins, update plugins, update theme, update WordPress etc
This is the summit of the whole tutorial. You’ve got a functional copy of your website (staging site). And now you can test anything you want on it. You can install new plugins or themes, update plugins or themes, update WordPress version to see if it does not break anything on your staging site.
To do that just click a link created by WP Staging plugin on a previous step and you will get into the staging site.
Administrator dashboard of the staging site has a bright orange top panel:
The panel helps you easily determine whether you work in your original website or the staging site
6. Make changes on your live site with no fear of breaking anythng
So, on a previous step you tested everything you wanted: updated plugins, installed new plugins, updates WordPress version etc. And you made sure it’s safe and does not break your website. Now you can do the same changes on your original website.
7. Remove staging site or leave it till the next tests
After I do all the tests I delete a staging site. Next time I want to test new plugins or updates of my WordPress software I create a new staging site. But your testing strategy may be different and you can have several staging sites.
There’s no limit on how many staging sites you may have. The only practical limit is only your disk storage.
Installing new plugins, updating existing plugins, updating themes or updating WordPress version can break your website. That’s why it’s recommended not only to have a reliable and efficient backup solution, but also test the changes of your website on a staging site.
Staging site is a functional copy of your website available only for administrators. The easiest way to create a staging site is using a special functionality which can be provided by an advanced hosting (see more details above).
But if your hosting does not offer staging environment, then you need to take care of it yourself.
One way is creating a totally independent clone of your website for running install and updating tests on a separate domain or subdomain. It can be easy and free if your website is small.
But it turns into a very challenging or daunting task, if your website is medium or large. Here’s where WP Staging plugin comes into play.
The plugin can create staging sites not only for small websites, but it also makes it possible to create staging sites even If your website is large. And in this article I’ve described how you can do it very easily.
Now you can avoid new plugins breaking your website. And you’ll be safe when updating plugins, themes and WordPress version. And the sweetest part is that this method is free 🙂
P.S.: When dealing with outdated plugins or WordPress version, a strong security solution will help you avoid being hacked.