Creating a WordPress child theme

Same of creating a child theme for the standard word press theme ‘twentytwentyfour’.

First create the theme sub-directory, and in that root sub-directory :

Create style.css

/*
Theme Name: MyChildTheme
Theme URI: https://southcoasthosting.com
Author: Gavin Simpson
Author URI: https://southcoasthosting.com
Description: Private and confidential theme for SCHS.
Template: twentytwentyfour
Version: 0.1
Requires at least: 5.0
Tested up to: 5.4
Requires PHP: 8.0
License: Private and Confidential
License URI: http://southcoasthosting.com
Text Domain: mychildtheme
*/

Create functions.php

<?php
if (!defined('ABSPATH')) exit;

ini_set('display_errors', TRUE);
ini_set('log_errors', TRUE);
ini_set('error_log', '/var/www/pnp/wp-content/uploads/wc-logs/gavin.log');
error_reporting(E_ALL & ~E_DEPRECATED);

define ('CSS_VERSION',1+time());
define ('THEME_DIR',get_template_directory());

class themeFunctions
{
	public function __construct()
	{

	}
}
new themeFunctions();
?>

Add “define(‘FS_METHOD’, ‘direct’);” to wp-config.php

Finally make sure uploads directory is www owned.