• Facebook Icon Link
    • Instagram Icon Link

    How to Edit the functions.php File in WordPress.

    edit the functions php file in wordpress

    What is the functions.php File?

    The functions.php file is included with WordPress themes. It acts like a plugin allowing you to add or change features or functionality on your WordPress website. You can call built-in WordPress functions or write your own. It is very important to note that if you are editing your functions.php file you should be using a child theme because all your edits will be lost when you update your main theme. How to make a child theme.

    Should I Edit the functions.php File or Write a Plugin?

    You should use the functions.php file to add simple code that is related to how your content is displayed. You should write a plugin for more complex code that is not dependant on your theme. If you want the code to still work if you ever change the theme, put it in a plugin. If not, use the functions.php file.

    How to Edit the functions.php File.

    There are multiple ways to edit the functions.php file, I will show you 2 different ways. Directly through the WordPress backend and with FTP.

    How to Edit the functions.php File Directly in WordPress.

    1. Login to the admin area of the WordPress website.
    2. In the admin sidebar, go to Appearance > Theme Editor.

    WordPress Theme Editor

    1. Click on functions.php in the right sidebar. (Make sure you are editing the child theme.)

    WordPress Theme Editor

    1. Edit the file as needed.
    2. Save or Update the file.

    How to Edit the functions.php File via FTP

    You will need to make an FTP connection to use this method. If you are unsure how to do this go here first: How to Create an FTP Account in cPanel. or How to Make an FTP Connection with FileZilla.

    Once you have an FTP connection:

    1. From the root directory of the website go to wp-content > themes > YOUR CHILD THEME.
    2. Locate the functions.php file.

    functions.php file

    1. Right click on the functions.php file and select Edit.

    edit functions.php file

    1. Edit the file as needed.
    2. Save the file.

    File has Changed

    1. Select Yes if prompted.
    2. Close the file in the text editor if done editing.


    Additional Posts.

    Pin It on Pinterest

    Share This