Having a second version of your website might seem like extra work, but in my years of supporting people who build their own websites, the biggest problem is stability. Unstable websites are often down to multiple plugins conflicting with each other, or orphan code left by deactivated or uninstalled plugins. WordPress can do so much, that when you first build a site it is easy to behave a bit like a child in a candy store. Plugins are installed and deactivated without any thought to their effect on your website. Everyone assumes once they are uninstalled they are gone. The problem is a badly programmed plugin do not always deactivate cleanly. Even after being uninstalled a plugin can leave traces of code in your WordPress files or unneeded data in the database that runs behind your WordPress install. Even a WordPress core update can cause issues that may take time to diagnose. The best way to ensure a clean and healthy website is to use a test site for all your experimentation and updates.
A test site can be on your local machine or on a separate domain or subdomain. While I have developed in a sub-folder in the same domain as a live website, on a short term basis, it is not a good permanent solution. The key is to keep your live website and file structure as clean and as uncluttered as possible.
You can also run a local copy of you website on you local machine. Software like Wamp and Xamp allow you to run a local testing server. However, be aware that it will never be a perfect duplicate of your main web hosting and you may have different issues when you install on your live website.
I use a plugin called BackupBuddy to create a duplicate of my websites.
The wpbeginner.com website have a good article on how to clone your website: ‘How to Clone a WordPress Site in 7 Easy Steps‘
As we all know Google reduces the page rank of websites with duplicate content. If you have a duplicate copy of your website , be sure to hide it behind a password in a secure folder so that search engines can’t find it.
Another reason to have a test copy of your website is the ability to test WordPress core, plugin and theme updates. While 99% of WordPress updates go smoothly the 1% that don’t usually fail spectacularly. When updates fail it can take hours and sometimes days to work out why. The last thing you want is to have an update fail on your live website.
Always remember that every plugin you install can add an unexpected security hole. Before adding any plugin always check if it is by a reputable author. Most importantly check when it was last updated. You do not want to be installing a new plugin that has not been updated in 2 years. New plugins can also slow down the speed of your website. Installing on a test site also allows you to find out how much this new feature will impact your page load time. If this effects your page load negatively you can then decide if it is worth installing on your live site.
Yes I know this is extra work,again! If you break your test site you want to be able to restore it easily, so you can carry on using it to test the next lot of features or updates.
This approach means that your live website stays clean of extra code it no-longer needs. Visitors of your website have no unnecessary downtime and your site stays secure, stable and fast.