When it comes to testing and setting up a new theme, its more or less a nightmare because you not only need to test it but also make it live on existing website and lot of new content is getting published on the website everyday.
For this kind of scenario, you have couple of options :
Setup Local WordPress Installation :
- Copy the MYSQL database from your cpanel to local XAMPP setup.
- Change settings like URL etc in the database to local url.
- Test out new themes
- Export the local Database & Import it into live installation.
- Make sure that anything new or changed is tracked and you sync it.
Create an online Mirror setup:
- Create a copy of the live side database.
- Setup a sub domain to test new theme and point it to the copied database.
- Once done, Sync everything and you are done.
Funny part is, its even more complex than what I said above. The biggest problem is keeping anything new in sync as live site will be busy publishing new articles.
Using the Plugin : Theme Test Drive
If you been using the WordPress from sometime and seen some codes, WordPress does allow to have different theme for different user level i.e. Admins can have different theme while subscribers (regular visitors) can have something different. We even have some plugins called as Theme Switcher.
Taking advantage of this, a plugin was developed name as Theme Test Drive, which allows you to have a different theme depending on user type.
In the above screenshot, it’s clear that all you need is select the theme which you want to test and then click on Enable Theme Drive Button and you are ready to go. None of your visitor will see this theme as it is only set for Admin users by default.
In case your have multiple users on your website, you can change the access level or use the theme=xxx parameter to to view the new theme.
Drawbacks or What You should be careful about :
You cannot modify custom menus being used with existing theme. Best is create a new set and test it. However, if you just want to use them without changing, its possible.
Page & Post Templates :
You cannot modify templates used in pages because they are not theme specific but always look for template file in existing theme.So when a visitor views, it looks for template file in that theme and for admin in different theme.
The best option is to get your templates ready, test with a sample page and see if they are working. Once your theme goes live, switch them quickly.
This plugin loads up all the plugins which is enabled. This means if you do not want to load a plugin during the test drive, there is no option. I really wish this option is rolled into future version.
My Experience with this :
I did not even the slightest problem using the plugin and nor did any of my user. In fact I tried visiting the website from different browser and computer to double check.
Also since the plugin does not have anything to do except setting up theme for Admin, it does not slow your site down and everything after that is WordPress. This has a minimal impact overall.