In my post, I show you how to access the functions PHP file on your WordPress website. Your website theme folder contains the functions PHP file there are three ways to access this file. I show you step by step how to locate and edit.
- Method one – WordPress Admin
- Method two – Hosting Control Panel
- Method three – Filezilla FTP client
Method one – WordPress Admin
On your WordPress admin dashboard, hover your mouse over ‘Appearance’, and select ‘Theme Editor’ from the popup menu.
On the next page, all the folders associated with your theme, are on the right.
The functions PHP file is here. To edit this file, click on the ‘Theme Functions’ link.
To edit, type your code, then select ‘Update File.’
You get a confirmation message once your edits are updated.
After updating the functions PHP file, visit your website to check everything is working as it should.
Method two – Hosting Control panel
Log into your hosting Cpanel, and select ‘File Manager’.
Next, select ‘public_html’ from the list on the left or center.
All the folders and files in public_html are for your website. Open the ‘wp-content’ folder.
In the ‘wp-content’ folder, open ‘themes.’
Next, select your active theme folder. For example, my active theme is Kadence I also have two others installed.
To confirm your blog’s active theme, return to your WordPress admin dashboard, and select ‘themes’ from the menu.
Your active theme is on the top-left.
The functions PHP file is in your active theme’s folder.
Before you edit this file, I recommend you download a copy first. If you have an issue with your site after editing, you can replace it with the original.
To download or edit this file, right-click on your mouse.
You will probably get an error message because this file is essential for your site. To continue, select ‘Edit.’
Make your edits and then select ‘Save changes.’
Method three – Filezilla FTP client
Using Filezilla allows you to access your website files similar to your hosting Cpanel. If you want to know how to download and install Filezilla, check out my ‘How to install Filezilla guide‘ post.
After you connect to your website via Filezilla, your site files are on the right, your computer files are on the left.
In the right-hand side top or bottom window, open ‘public_html.’
Next, open ‘wp-content.’
Then open ‘themes.’
In the themes folder, select your active theme.
The functions PHP file is in this folder.
Before you make any changes to your functions PHP file, I recommend you download a copy to your computer. If your website has errors after you make your changes, upload the original to overwrite the edited file.
To download and edit this file, right-click on your mouse.
Once you have added your code, save your changes.
After you close ‘Notepad’, another message asks you to confirm your changes, select ‘Yes.’
Filezilla updates the functions PHP file and notifies you when the updates are complete.
Finally, visit your website to check that everything is working.
The functions PHP file is in your theme folder. You can access this file through your WordPress admin, your hosting Cpanel, and via an FTP client.
Before you make any changes to the functions PHP file, ensure you are confident the code you plan to add is correct. This file is essential for your site errors on this file will break your site.
Access via your WordPress admin dashboard is the quickest method to edit your functions PHP file but comes with risks. You can’t make a copy of your file, so if you add incorrect code, your site will break.
The safest options are making changes through your Cpanel or an FTP client. You can download a copy to your computer before you edit the file. Should you break your site, then you can replace the edited file with the downloaded one.
Before you go to locate the functions PHP file on your WordPress blog, would you kindly leave me a comment? I appreciate all feedback.
For more WordPress tutorials, check out my YouTube channel, I have videos about WordPress, SEO, keyword research, and the Amazon Affiliate program.