The functions.php file in WordPress is located in your themes folder. I will show you three ways to access this file.
If you are planning to add code to this file, make sure you have a backup or copy of the file before you add the code. This file is important, it makes sure your site theme runs. If you add code that WordPress can’t read, your site will crash.
Let’s find your functions.php file.
- One – Finding your functions.php file via your WordPress dashboard
- Two – Finding your functions.php file via your file manager in your Cpanel
- Three – Finding your functions.php via Filezilla FTP client
One – WordPress admin dashboard
In your WordPress admin dashboard, hover your mouse over ‘Appearance’, and select ‘Theme editor’ from the popup menu.
Once you select ‘Theme editor’, WordPress warns you that editing files directly from your WordPress dashboard could cause your site to break. WordPress recommends that you edit files in your Cpanel. That way you can make a copy of the file, should anything go wrong, then you replace the edited file with the original.
If you are sure you want to edit your functions.php file from your dashboard, select the blue ‘I understand’ link.
Now you have access to all the files for your website. The files are listed on the right. The functions.php theme is under ‘Theme functions’.
To edit your functions.php file, select the blue ‘Theme functions’ link.
Now you can edit the file.
You add your code within the window. Once you have finished adding your code, don’t forget to click on the blue ‘Update file’ link at the bottom of the page.
Two – File manager in Cpanel
In the dashboard of your Cpanel, look for the ‘File Manager’ icon. This is my dashboard and the icon is at the top.
Once you are in the ‘File Manager’ look for your ‘public_html’ folder and open that folder.
In the ‘public_html’ folder, you will find all your website’s files and folders. From this list, we want to find and open the ‘wp-content’ folder.
In your ‘wp-content’ folder, locate and open the ‘themes’ folder.
Next, you have a list of themes installed. Open the folder of your active theme. My active theme is Ashe.
If you are not sure of the name of your active theme. Go to ‘themes’ in your WordPress dashboard, your active theme is on the top left.
Your functions.php file is in your active theme folder.
Before you edit this file, I recommend you download a copy first. Then if you have an issue with your site after editing this file, you can replace it with the downloaded file.
To download or edit this file, right-click on your mouse.
Three – Filezilla FTP client
Another way to gain access to your functions.php file is by using an FTP client. A very popular FTP client is Filezilla and that is what I will be using for this tutorial.
Filezilla allows you to gain access to your website files without going through your Cpanel dashboard.
After you log in to your website through Filezilla, your site files are in the two windows on the right. Your computer files are in the two windows on the left.
On the right, look for the ‘public_html’ folder.
As we had with the ‘File Manager’ in Cpanel, we have access to our website folders and files.
Now, we are looking for ‘wp-content’.
Open the ‘wp-content’ folder and look for the ‘themes’ folder.
In the themes folder, look for your active theme. My active theme is ‘Ashe’. If you are not sure of the name of your active theme, select ‘Themes’ from the menu on the left in your WordPress editor. Your active theme is the first theme on the top left.
You will find the ‘functions.php file in your active theme folder.
Before you edit this file, I recommend you download a copy to your computer. If your website has errors after you edit the functions.php file, then you can upload the original copy to overwrite the edited file.
To download and edit this file, right-click with your mouse.
If you would like to use Filezilla, check out my ‘How to download and install Filezilla‘ post.
There are three ways to gain access to your functions.php file in WordPress.
Access the file through your WordPress admin dashboard is the quickest method but comes with risks. If your code is wrong, you could break your site.
The safest options are through your Cpanel and 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 original and your issues are solved.
If you prefer video tutorials, check out my YouTube channel, I have videos about WordPress, SEO, keyword research, and the Amazon Affiliate program.
If you have any questions about this post or WordPress, please leave your questions in the comments box below. I check for comments every day.
I look forward to reading your comments.