In my post, I show you how to access and edit the functions.PHP file on your WordPress website, step by step.

The Functions.php file is in your theme folder. There are three ways to access the functions.php file, WordPress admin, a hosting Control Panel, or an FTP client.

Let’s begin.

How to access and edit the Functions.PHP file through WordPress admin

Before making edits to the functions.php file, run a backup of your website. For a WordPress tutorial on backing up your site, check out my ‘How to back up your WordPress website‘ post.

  1. Select ‘Appearance’ and then ‘Theme Editor’ from the menu.
  2. From the list of files, select ‘Functions.PHP’.
  3. Add your code to the file.
  4. Select ‘Update File’.

From the WordPress admin dashboard, hover your mouse over ‘Appearance’ and select ‘Theme Editor’ from the menu.

Select theme editor from the menu

From the list, select ‘Theme Functions (functions.php).

Functions PHP file

Add your code to the file, then select ‘Update File’.

Update file to actions edits

Once updated, you receive a confirmation message.

Update file confirmation message

After saving your updates, go to your website to ensure everything is working.

How to access and edit the Functions.PHP file through your Hosting Control panel

  1. Select ‘File Manager’ from your Cpanel dashboard.
  2. Open the ‘public_html’ folder.
  3. Open the ‘wp-content’ folder.
  4. Open the ‘themes’ folder.
  5. Open the folder to your active theme.
  6. Right-click the functions.php file to make a copy.
  7. Right-click the functions.php file to edit.
  8. Confirm edit.
  9. Add code.
  10. Select ‘Save Changes’.

On your Cpanel dashboard, select the ‘File Manager’ icon.

Select file manager

Next, select ‘public_html’ from the list on the left or centre.

Open public_html

Open the ‘wp-content’ folder.

Open wp-content

Open the ‘themes’ folder.

Open themes

Next, select your active theme folder. For example, my active theme is Kadence.

Open your current active theme folder

The functions PHP file is in your active theme’s folder. I recommend you make a copy of this file before you edit.

Functions PHP file

To make a copy, right-click and select ‘Download’. Should your site have problems, you can upload the original file.

Right click to download or edit

To add code to this file. Right-click and select ‘Edit’.

Right click to download or edit

A warning asks you to make a copy before editing. To continue, select ‘Edit’.

Select edit to continue

Make your edits and then select ‘Save changes.’

Save changes

After updating your changes, go to your website to ensure everything is working.

How to access and edit the Functions.PHP file through an FTP client

  1. Connect to your website
  2. Open the ‘public_html’ file.
  3. Open the ‘wp-content’ file.
  4. Open the ‘themes’ file.
  5. Open your active theme file.
  6. Right-click to make a copy.
  7. Right-click to edit.
  8. Add your code.
  9. Select ‘File’ and then ‘Save’ to update your changes.
  10. Confirm changes.

For this tutorial, I am using the Filezilla FTP client. To download and install Filezilla, check out my ‘How to install Filezilla guide‘ post.

After you connect to your website via Filezilla. Your website files are on the right, and your computer files are on the left.

On the right, open the ‘public_html’ folder.

Open puiblic_html

Next, open the ‘wp-content’ folder.

Open wp-content

Then open the ‘themes’ folder.

Open themes

In the themes folder, select your active theme.

Open your current theme folder

Before making changes to the functions.php file, I recommend you make a copy. If your site has issues after you update, you can upload the original file.

Functions PHP file

To make a copy, right-click and select ‘Download’. Should your site have problems, you can upload the original file.

Right-click to edit and download

To add code, right-click and select ‘View/Edit’.

Right-click to edit and download

Add your code and then click on ‘File’ and select ‘Save’.

Save your changes

Confirm your changes by selecting ‘Yes’.

Confirm changes

Once updated, you receive a confirmation message.

Update confirmation

Finally, visit your website to check that everything is working.

Conclusion

The functions.PHP file is in your theme folder. You can access this file through your WordPress admin, your hosting Cpanel, or 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.

I recommend accessing the functions.php file through your Cpanel or an FTP client. You can download a copy to your computer before you edit. Should you break your site, then you can replace the edited file with the original one.

For more WordPress tutorials, check out my YouTube channel. I have videos 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.