Best method for changing Wordpress themes?

If you have a Wordpress site up, and it has been in use for 2 years (with the many posts and things that go along with that), what is the best method for installing a new theme, without taking the whole site down?

The thing is, I have a friend with a Wordpress site he has posted to for a couple of years.  It is a pretty involved site.  Now he wants to install a new Wordpress theme.

Wordpress themes (at least the ones I have used) are not simply plug-and-play.  They require lots of tweaking and shortcode manipulation to get the look "just right".

One way is to use a plugin to show a maintenance page to visitors while the tweaks are done to the new theme.  But, this can mean the site is down for a week.

Is there a way to work on a new theme, then "flip the switch" on it when you have it like you want?

I could create a completely new site using, backup the entire site from, install the backup to, change all of the domain name stuff, do the work there, then back everything up from, movve it all back to and change the domain name and related database fields back and cross my fingers that all of this works - but, damn that seems like a lot of work for something that, I assume, people do pretty regularly (change their Wordpress themes).

There has to be a better (easier) way to do this without disrupting the current site.

What am I missing?
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Sudaraka WijesingheWeb Application ProgrammerCommented:
As I start to read your (quite long ;) ) description, first suggestion came in to my mind was to tell you to make a backup of the DB and files and create a test site to work on.
But it seems that's the exact thing you are trying to avoid.

So I'm going to suggest this instead. Please note this is not some thing used in practice, I only know it works but don't know if it would be easy.

In the recent version of Wordpress (3 and later I think) there is an option in the theme selection page to preview in the site using a theme other than the one currently activated. If you examine that link, it goes something like this.

Open in new window

You can use that to see the site in the theme you want. By default it open in a popup/iframe, but if you copy the link and paste it into a browser you will be able browse normally. (Might help to drop the iframe parameters)

Open in new window

Hope this helps.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
JimHubbardAuthor Commented:
It did help.  Thanks.

But, I think I've found out why it won't really work (and why I am going to have to go the long way around).

If I change things like the menu, sidebar locations, etc, those changes will show on the current site - even though the theme stays the same.

Not to mention the changes to the admin menus that come with a lot of themes.  The theme-specific menu items on the admin pages only show when a theme is activated.

IMHO, Wordpress really needs to roll in functionality that will duplicate the site (using temp directories in MySQL while leaving the tables used to store uploads, posts and comments alone) and then merge the changes (after making a backup of the old site of course).  The temp directories should show the new site design to logged in users designated by the admin to see the in-progress theme. looks like I am stuck with copying the entire site, setting up a dummy test domain, blah, blah blah.....

Thanks for your input though.

I think I'll try BackupBuddy.  It looks like it handles the backup and migration.  It should make this whole thing a little easier.

The only possible problem with BackupBuddy will be that any post, comments, uploads or added pages done between the time I copy the original site to m test location and the time I copy the test to the main site will be lost.

Dammit!  With theme changes being such an integral part of Wordpress, you'd think someone would have addressed this by now.

Looks like the site may be down a few days while the new site is built.
Sudaraka WijesingheWeb Application ProgrammerCommented:
Since you are creating a test domain anyway, you can clone both files and database to be used in it and work on them leaving the existing site as it is until you are done with the modifications. After you are done with the upgrade you can merge them to the live site.
Few days downtime can really hurt a web site.

Good luck with the upgrade. And thanks for the points.
Angular Fundamentals

Learn the fundamentals of Angular 2, a JavaScript framework for developing dynamic single page applications.

JimHubbardAuthor Commented:
The idea of "merging" the sites seems scary.  Some items need to be overwritten, some need to stay (like posts, comments, etc).

So, how would you merge the test and live sites while preserving all changes to the new theme, plugins, sidebars, etc without overwriting the new posts, pages, links in blogroll, changes to content of sidebars etc?

I don't think it's possible.

You'd have to make a copy of the test site database tables and directories before you change anything, make all of your changes to the new site, then do a comparison of the beginning database file and directories to get a list of changes.  Then, you'd have to create a package of changes to import into the live site (both for the database and directories).

In theory, this should not overwrite any comments, posts or pages.  It may overwrite links in blogrolls, themes, images, etc..

The only possible issues would be if Wordpress were updated while the test site was being built on an older version.  Ideally changes on the live site should be frozen (with the exception of posts, pages and comments) while the new site was being built.

That's what I need.

Know a good PHP developer?
Sudaraka WijesingheWeb Application ProgrammerCommented:
In Wordpress (and in any CMS for that matter) UI is separated from data and can be modified without effecting any data you have.
You new theme could hide some links or post, but that data is not deleted from the database by switching the theme, in any case you can change it back to the old theme.

However, If you are in doubt of the procedure it would be best to hire a professional to do it for you.
There was an option in EE to search for available experts, I'm not sure if that possible in the new system.
You can post on the Wordpress forums to look for someone, or google for a Wordpress developer.
JimHubbardAuthor Commented:'s what I have decided to try.

Make the test domain, copy the existing site there, make my changes and prep it to migrate to the live site.

I'll put the live site in maintenance mode, and do a complete backup and save that somewhere safely off the live site.

Before migrating, go to the Admin menu, Tools>Export, select All Content and do an export.  

It says "All content This will contain all of your posts, pages, comments, custom fields, terms, navigation menus and custom posts."  I hope that means that it also keeps attachments, images etc.

I'll use BackupBuddy to migrate the test site to the live site.  Then, I'll import my exported data into the live site and disable maintenance mode.

If all goes as planned, this should do the trick.

I''ll let you know.

My only concern is that I will be creating content while creating the new look (for sliders, landing page, and so on). For example, if I create a cool new Home page, it may be overwritten in the import of the old data (since I had an old Home page in the old site).

Well....I might as well dive in.  As long as I have backups, I should at least be able to get back to square one if the whole thing craps out on me.
Jason C. LevineDon't talk to me.Commented:
You've pretty much hit on it.  What you describe initially is an ideal but it doesn't exist.  Clone and replace or clone and merge are the only two options at present.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.