Where is the functions.php file in WordPress?

The functions PHP file in WordPress is located in your themes folder. You can access this file through WordPress, your hosting Cpanel, or via an FTP client.

In my post, I show you step by step how to access functions PHP in WordPress.

Let’s begin.

Accessing functions PHP via WordPress

In WordPress, hover your mouse over ‘Appearance’, and select ‘Theme editor’ from the popup menu.

Select theme editor from the 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 via your hosting Cpanel. It is a better option to edit via your Cpanel because you can make a copy of your file before you edit.

Should there be any issues after you finish editing, then you can replace the edited file with the copy.

WordPress warning

If you are sure you want to edit your functions PHP file from WordPress, select the ‘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’.

Website file list in WordPress

To edit the functions PHP file, select the ‘Theme functions’ link.

This is the functions PHP file, add your code here. Once completed, update the file by selecting the ‘Update file’ link on the bottom left.

Finding functions PHP file via your hosting Cpanel

Log into your hosting Cpanel, on your dashboard select ‘File Manager’.

Once you are in ‘File Manager’, select ‘public_html’.

public_html folder

In ‘public_html’, you will find all your website’s files and folders. From this list, open the ‘wp-content’ folder.

wp-content folder

In ‘wp-content’, open the ‘themes’ folder.

themes folder

Next, you have a list of themes installed on your site. Open the folder of your active theme, my active theme is ‘Ashe’.

Active theme folder

If you are not sure of the name of your active theme. Go to ‘themes’ on your WordPress dashboard, your active theme is on the top left.

Active theme

Your functions PHP file is in your active theme folder.

Functions.php file

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 copy.

To download or edit this file, right-click on your mouse.

Right-click to download or edit your functions.php file

Accessing functions PHP via Filezilla FTP client

The third way to access functions PHP is via an FTP client. A popular FTP client is Filezilla and that is what I am using for this tutorial.

Filezilla allows you to gain access to your website files without going through your hosting Cpanel.

After you log in to your website via Filezilla, your site files are shown on the right, computer files are on the left.

On the right, select ‘public_html’.

public_html folder

In the bottom window on the right are all your websites files and folders. On this list, select ‘wp-content’.

wp-content folder

Then select ‘themes’.

Themes folder

In the themes folder, select 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 WordPress. Your active theme is the theme on the top-left.

Active theme
Active theme folder

Functions PHP in your active theme folder.

Functions.php file

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.

Right-click to download and edit your functions.php file

To learn how to use Filezilla, check out my ‘How to download and install Filezilla‘ post.

Conclusion

There are three ways to gain access to your functions PHP file in WordPress.

Access via 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 downloaded copy.

Before you go to locate the functions PHP file on your WordPress blog, would you kindly leave me a comment? Did you find my post helpful? Would you like me to add more information? I look forward to reading your feedback.

Check out my YouTube channel, I have tutorials about WordPress, SEO, keyword research, and the Amazon Affiliate program.

Similar Posts

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.