Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17


Best method for changing Wordpress themes?

Posted on 2012-03-25
Medium Priority
Last Modified: 2012-03-25
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?
Question by:JimHubbard
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 3
LVL 18

Accepted Solution

Sudaraka Wijesinghe earned 2000 total points
ID: 37763561
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.

Author Closing Comment

ID: 37763595
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.
LVL 18

Expert Comment

by:Sudaraka Wijesinghe
ID: 37763636
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.
Looking for a new Web Host?

Lunarpages' assortment of hosting products and solutions ensure a perfect fit for anyone looking to get their vision or products to market. Our award winning customer support and 30-day money back guarantee show the pride we take in being the industry's premier MSP.


Author Comment

ID: 37763665
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?
LVL 18

Expert Comment

by:Sudaraka Wijesinghe
ID: 37763704
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.

Author Comment

ID: 37763712'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.
LVL 70

Expert Comment

by:Jason C. Levine
ID: 37763774
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.

Featured Post

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

If you are looking for plug-ins to add functions to your WordPress small business web site, take some time to read though this comprehensive list.  These are all the plugins I use for my customers WordPress web sites, as well as my own.  Be sure to …
I annotated my article on ransomware somewhat extensively, but I keep adding new references and wanted to put a link to the reference library.  Despite all the reference tools I have on hand, it was not easy to find a way to do this easily. I finall…
The purpose of this video is to demonstrate how to make a WordPress Site faster and smaller in size by cleaning up the database. This will be demonstrated using a Windows 8 PC. Plugin WP Optimize will be used. Go to your WordPress login page. T…
The purpose of this video is to demonstrate how to Import and export files in WordPress. This will be demonstrated using a Windows 8 PC. Go to your WordPress login page. This will look like the following: : Click on Too…

670 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question