Always Use a WordPress Child theme

Always create a child theme. I write it in every blog post and for good reason.

  1. Child themes prevent your updates from being overwritten when the theme updates.  It will save you that feeling of white hot terror when you find all your updates have been removed.
  2. Version control is much easier with a child theme.
  3. Because most of the site customizations are in one place, it makes it easier for developers to help when you need it.

Template over rides and custom code should all be saved into a child theme.  WordPress cannot copy over a child theme.  Child themes are a convenient way of collating and keeping all customizations together and they make version control much easier too.

The first thing I do when I make a new site is the install my favourite theme.  I choose to use Divi from Elegant themes.  

The second thing I do is install Child Theme Creator and make a Divi child theme. This one is free and the author has been around the wordpress community for a long time chiming in with a ton of valuable wordpress related contributions.  I like to pay it forward… that’s why I continue to use it.

It doesn’t matter which theme you use, Child Theme Creator works with all of them.

There are probably a few other child theme plugins around… but I have been using this one for a very long time and its never failed me. 

If you choose to use another plugin, the concept will be the same.

Child Theme Creator by Orbisius

Once installed, setup is just a few clicks.

A new theme folder will be created on your server where you can save any custom files.

When you SFTP into your server you will see where the folder has been created in your themes folder /wp-content/themes/

Opening my child theme folder you will notice I have added some custom files that I use across the site.

Upload your custom files to your child theme to keep them safe from wordpress updates.

Any custom function that you create should ALWAYS be saved to functions.php of your CHILD THEME.  DO NOT save it to the parent theme functions.php because you will eventually lose it.

Any CSS that you add is ALWAYS saved to style.css in your CHILD THEME.  Often your theme customizer will provide a space to add CSS which it saved to the database.  This is OK but I prefer to add the CSS to a style sheet and upload it because its one less thing the database has to do which makes the site slightly faster.  It makes version control must easier too because everything is in one place.

In the end it doesn’t really matter if you setup a child theme using a plugin or you do it manually… ALWAYS create a child theme.

 

Damon
Damon

Damon is the Principal Full Stack Developer at WPFix and freelance consultant. If you need help implementing anything wordpress related, please reach out to make an appointment.

0 Comments

Submit a Comment

Your email address will not be published. Required fields are marked *

Recent Posts

  • Wordpress Better SEO GTMerix and Ligthouse Scores slider
  • Wordpress Instant Search Bar slider
  • woocommerce disable rich text editing for shop managers slider
  • Woocommerce admin multi SKU search slider
  • Wordpress Enhanced Search slider