After installing WordPress, you have to find a suitable theme to work with. So, after you found it, you install it and than it is recommended to create a child theme if you want to make some changes to the actual design (colors, fonts, etc.).

So, the question is: How do I create a chid theme on WordPress?

Just follow these steps:

  1. Navigate to ” wp-content/themes ” , create a new folder and name it as you like ” mytheme “(only lowercase and no space).
  2. Create a css file and name it “style.css” and open it.
  3. Inside the ” style.css ” file you will write:
    /*
    Theme Name: Twenty Fifteen Child
    Theme URI: http://example.com/twenty-fifteen-child/
    Description: Twenty Fifteen Child Theme
    Author: John Doe
    Author URI: http://example.com
    Template: twentyfifteen
    Version: 1.0.0
    License: GNU General Public License v2 or later
    License URI: http://www.gnu.org/licenses/gpl-2.0.html
    Tags: light, dark, two-columns, right-sidebar, responsive-layout, accessibility-ready
    Text Domain: twenty-fifteen-child
    */

    Replacing with your parent theme details.
    ATTENTION! On the “Template” line you have to write exactly the name of the parent theme folder.
  4. Create another file ” functions.php ” and open it.
  5. Inside the ” functions.php ” file you will write:
    <?php
    add_action( 'wp_enqueue_scripts', 'theme_enqueue_styles' );
    function theme_enqueue_styles() {
    wp_enqueue_style( 'parent-style', get_template_directory_uri() . '/style.css' );
    }
    ?>
    Than save the file.
  6. Go to WordPress Dashboard > Appearance > Themes and activate your theme.
    All the files you need to modify will be copied from the parent theme folder in your child theme folder and modified there.
    For example: if you will copy and modify the ” header.php ” file, WordPress will use your version to render the website.

This way all the changes you make will remain even after the parent theme will update.

Please write a comment if you need more details regarding this subject.