You can edit your WordPress Site files in multiple ways including using,
- editing files from within the CMS,
- connecting via FTP from your local computer,
- your file manager on your server,
- using GIT to upload files.
Table of contents:
- Editing files from within the CMS
- Connecting via FTP from your local computer
- Your file manager on your server
- Using GIT to upload files
Editing files from within the CMS:
Theme File Editor:
You can edit your theme’s files by going to the CMS and in the left hand menu clicking on ‘Appearance’ -> ‘Theme Files Editor’. You can then use this page to edit any file in your theme or child theme.
PROTIP: You should create a child theme as best practice for editing your theme. This is because if you update (or it is auto updated by WordPress itself) your theme from its developer any changes you made to the original theme will be over written. A child theme is a separate piece of code which will ensure your changes are kept and you can still update your theme.
Plugin File Editor:
You can edit your plugin files by going to the CMS and in the left hand menu clicking on ‘Plugins’ -> ‘Plugin File Editor’. You can then use this page to edit any file in any of your plugins.
PROTIP: You quite possibly don’t want to do this however. Editing your plugins directly is not good coding practice and should only be done for emergency and temporary fixes. The proper way to alter your plugin functionality in WordPress is to either use of of the hooks and filters provided in the WordPress API or by over writing a plugin template. If you update the plugin directly these changes will be over written the next time this plugin is updated either by yourself or automatically by WordPress itself.
Connecting via FTP from your local computer:
FTP is short for File Transfer Protocol and will allow you to view, upload or download files from your WordPress Site.
Your ‘File Manager’ on your server:
Your hosting account quite possibly uses a piece of software called cPanel which allows you to edit your WordPress site files. This can be especially useful if you don’t have FTP access to your site and can’t login to the CMS to use the file editors there.
To access login to your hosting account platform (for eg Bluehost or WPEngine or SiteGround) and find the ‘cPanel’ area of your hosting account. It will differ on each hosting dashboard so I can’t be more specific than that. Have a look around.
If you don’t find mention of a cPanel then look for ‘File Manager’ which is ultimately where we need to get to. Click into it and then navigate to your sites ‘root folder’.
Inside of the root folder, often called ‘sites’ of ‘public_html’ you will find your site WordPress files.
PROTIP: If you have only one site you will probably find the WP files straight away but if you have multiple sites look around for the sites inside of the aforementioned folders above.
Here you will have access to each folder from WordPress itself, all plugins and themes and any root level files like wp-config.php of any verification files (like that Google Analytics requires) that may be needed.
You can scroll this file manager through its folder structures to find the files or folders in which you want to view, edit, create or delete and files you need to.
You will see at the top of the File Manager screen various different commands to view, create, edit, delete files and many more functions you can do.
Using GIT to upload files:
GIT is a version control software which you can use to manage WordPress Files for you theme or plugin. It isn’t recommended to put all of your WordPress site into a GIT repository as it is always being updated etc which breaks the workflow and logical reasoning for using GIT.