You will need a few things before you start:
- Direct file access over ftp or Plesk Explorer / CPanel or similar.
- Text Editor or Code Editor, i prefer Visual Studio Code, because it’s lightweight.
If you have access navigate to the wordpress installation folder and go to /wp-content/themes from there note down the name of the theme you want to create a child theme.
Create a folder inside of the themes folder, the name should be “THEMENAME-child”, meaning the name of the theme plus “-child” appended to it.
Inside of this folder create 3 files:
- Screenshot of your theme, for display purpose when you select the theme inside wordpress. Name must be “screenshot.png”, you can also copy the same than the theme you want to do the child.
- A Theme Functions file “functions.php”. A php file must always begin with “<?php” as first written thing, otherwise it wont work. After that you can add all the functions you may want to add.
- A Stylesheet “style.css”. write the following inside adapted to your needs:
/* Theme Name: THEMENAME Child Theme URL: http://yourdomain.com Description: THEMENAME Child Theme Author: Your Name Author URL: http://yourdomain.com Template: THEMENAME Version: 1.0.0 Text Domain: THEMENAME-child */
replace THEMENAME with the actual theme name.
save all your work, that’s it.