How Do I Make Customizations to My WordPress Site That Won’t Get Lost After an Upgrade

For most of us with WordPress websites we like to tweak a little bit of everything to make it look just so, and the beauty of WordPress is that you are able to do this. BUT, if you’re simply modifying the files that come with the theme then every time you do an upgrade you have to re-apply the changes that you have made.

Ever lame!

A super easy solution to make sure that your theme customizations aren’t overwritten is to create a child theme.

I know, I know, you’re not a developer and you don’t want to have to create a whole new theme all by yourself, right? Not to worry my friend, it’s far more simple than you’re imagining. A child theme basically borrows the files from your regular theme and acts as a holder for your customizations, so you’re not re-creating everything from scratch after all.

Here’s how you create a child theme to go along with whatever WordPress theme you’re currently using:

1. Using FTP, navigate to your themes folder and create a new folder. You can call it whatever you want.

2. Create a text file called style.css and put it in this new folder.

3. Add this header info into the css file:

/*

Theme Name: whatever name you want your child theme to have eg. SMac’s Child Theme

Description: whatever description you want here

Author: your name

Version: 1.0

Template: twentyten (or whatever the name of the theme is that you’re currently using)

*/

The Template field is particularly important, make sure to type the name of the theme folder exactly as you see it in the themes folder, it’s case sensitive. In the example above I’ve used twentyten as my main theme. The Description, Author, and Version fields are all optional.

4. Add this nifty line into your css file (after the header info) to import the css info from your main theme:

@import url(“url of the main theme css file”);

Now all you have to do is add any css changes you want to this new css file in your new theme folder and anything you put here will override the main theme’s css.

5. If you want to make changes to any other theme files, eg. Loop.php, Functions.php, you can put them here too and anything that you add will be used as well as the main theme files. This step isn’t necessary, the only file that a child theme absolutely must have is style.css.

6. Activate your new child theme – if all is ready you can log into your wp-admin as usual, go to the Appearance section and you’ll see your new child theme sitting there ready to be activated. Go ahead and activate your child theme and voila!

All done! Super simple really, if you know a bit of coding, and let’s be honest, you probably wouldn’t be fiddling around with the guts of your WordPress installation files unless you already know a bit of coding, right?

Now you’re all set to do your next upgrade, and joy of joys, all of your customizations will still be there when you’re done! Yay!

Sarah MacGregor a.k.a. SMac is a Canadian Virtual Assistant, CEO of SMac To The Rescue, and Efficiency Expert who teaches small business owners and entrepreneurs how to increase their business efficiency and get unstuck. To learn how she can help your business with her Efficient Virtual Assistant Super Powers, and to sign up for her free Super Efficiency E-book series, visit her site at http://www.ToTheRescue.ca

Internet Articles Dot Net
Hi! I'm the System Server Robot for Internet Articles Dot Net. It's my job to scour the internet to find free quality articles to place here in our directory. Believe me, your article wouldn't be here if we didn't consider it a good quality, well written article, and we make sure that you get full credit for your article with your bio intact.

If your article was placed here on our site by me and you wish to create an account and have your article put under your name, use the "contact us" form and let us know. We'll be more than happy to make it so. Contact Us