A Guide to WordPress Re-Theming
While switching from one WordPress theme to another is just as simple as a single click, one might bump into a bit of a trouble if your blog is heavily customized and you want all that to reflect in the new theme as well.
This is more of an issue for blogs who are running AdSense (or any other contextual advertising campaign) because it might affect your clickthroughs while in the transition state. Rain recently has some problems with his WP re-theming and while I am helping him out to find a fix for it, I thought of some few ideas which might help everyone out there if they plan to switch themes smoothly.
- Install a WP Backup Plugin. I recommend Ryan Boren’s WP One-Click Backup v1.5 here.
- Install the WP Theme Switcher. Don’t forget to add the “get_theme_switcher()” function in your current theme. Place it somewhere nobody else can see so you’ll be the one who’d be able to switch themes publicly.
- As a precautionary measure (redundancy), do a cPanel home backup or export your WP DB via phpMyAdmin.
- Instal the new WP theme but don’t activate it. Activate the WP Theme Switcher and switch to the new theme with that. You will be viewing the new theme while the rest of the world will still see the old one.
- Edit the templates of the new theme including the css.
- Do not overwrite old images like headers or logo. Just create a new folder and place them all there or use new names for them.
- Copy over the hacks, custom scripts or code snippets from the old theme to the new one.
- If you need to edit the .htaccess (for some new rewrite rules), make a backup of the old one. In case you made a mistake, you can revert back immediately.
- Check, check and check if you missed something.
- Activate the new theme.
- Disable Theme Switcher.
- Grab a beer and celebrate!
Following these steps, I’d say you’d most likely get zero downtime. If you have some additional tips or suggestions for the above, feel free to leave a comment.