- Note: Do not EVER edit the Genesis theme files!
- Note: Do not EVER edit the child theme files!
- If you have to make a coding change, use the Code Snippets Plugin
- If you have to make a styling change, do it in the “Additional CSS” screen in the customizer
Best Way: Code Snippets Plugin
The code snippets plugin for WordPress adds an easy way to add code to customize your website, without touching your theme files.
Anywhere you see “functions.php” in a tutorial, head over instead to the Code Snippets Plugin and put the changes in there.
Then go to your Admin -> Plugins -> Add New -> Upload Plugin and upload and install the plugin. You’ll find it listed in the plugins section like this:
Putting the customizations into a plugin provides a simple way to check if your customization is causing the problem: simply disable the plugin and clear all your caches to see if the problem resolves itself.
Safety First: Backups
You should be using a hosting provider that backs up your website daily, so that any changes (including plugin updates) can be rolled-back to yesterday’s version.
You can also do this manually each time you’re making a change, but this becomes tedious, and you risk not having a recent backup if something goes wrong.
If making changes, we recommend doing this first thing in the morning to avoid losing the days’ work if a restore is needed.
Use a Staging Site
Your hosting provider should provide a way to clone your website so that you can make major changes to the non-live cloned site before pushing them to your live site.
Editing your Food Blog Child Theme Files
Editing your child theme files is a bad idea. It makes updating extremely tedious and time consuming. Instead, use the Code Snippets Plugin for editing your child theme.
You can access the theme files in the WordPress editor (Appearance -> Editor) or your hosting cpanel’s file manager to make the changes.
We recommend using the Code Snippets Plugin method above instead!
If you are planning to make edits to your theme files (especially php) we strongly suggest you learn how to do so using FTP or via your hosting cpanel. This will ensure that if you commit a coding error you’ll be able to easily and quickly restore your website from the backup you should have of any files you plan to edit.
If you make a critical error (easy to do in your functions.php file) then you will get what’s known as the white scree of death and you’ll be locked out of your site so it’s very important to keep a backup of files you plan to edit.
If updating by FTP:
- Download the most recent file from your server via FTP
- Edit the file using a program like Notepad ++ on your computer
- Upload the file back up to your server
Adobe Dreamweaver is an all-in-one FTP program and file editor, but comes at a steep price of about $30/month.
Filezilla is a common free FTP program, and Notepad++ is a good basic text editor.
Google is your friend if you need a more comprehensive guide than this, or FTP software recommendations.
Any customizations you make to your child theme files will be lost during a theme update. Note that theme updates are full re-installations.
Again: Back up your files
No matter which method you choose, always make sure you have a backup of your files to fall back on, and that you know how to restore your site via FTP or your hosting cpanel in the event of a coding error.
Ideally, your hosting company will have automatic daily backups, making reverting back to a working copy of yesterday a breeze.