Wiki

Clone wiki

DevFecta Public Repository / WordPress

Child Theme

Create a child theme to prevent the overwrite custom changes to the parent theme.

  1. Create a directory for the child theme named <parent theme name>-Child
  2. Create these files in the child theme's directory: DevFecta WordPress Child Theme Files
    • functions.php
    • style-login.css
    • style-login.js
    • style.css
    • screenshot.jpg for child theme thumbnail (1200 x 900 pixels)
    • favicon.png for Gravatar/Favicon (512 x 512 pixels)
  3. Upload these files to the /wp-content/uploads directory for custom background and logo on the WordPress login page:
    • LoginLogo.png (512 x 512 pixels)
    • LoginBackground.png (2880 x 1923 pixels)

Configuration

Permissions

Change WordPress directory ownership to www-data to make any updates and/or installations:

sudo chown -R www-data:www-data <WordPress Directory>
Change WordPress directory ownership back to the user account after updates/installations:
sudo chown -R <username>:www-data <WordPress Directory>

sudo chmod -R g+w <WordPress Directory>
Change WordPress Uploads directory ownership to www-data to allow uploading images to Media:
sudo chown -R <username>:www-data <WordPress Directory>/wp-content/uploads
The WordPress directory should be set to: drwxrwxr-x <username> www-data <WordPress Directory>.

Pretty URLs Configuration

sudo a2enmod rewrite

sudo systemctl restart apache2

sudo nano /etc/apache2/apache2.conf  // To change "Directory /var/www/" AllowOverride to All

Updated