How to Edit the functions.php File Using cPanel?

Once in a while, you may require to add an additional code to your website and functions.php is one of the most important files you may come across.

Whether you ought to add an extra feature to your website or modify the existing features controlled by your WordPress theme, you need to edit this file.

But most of the people fret because of the technicality of using cPanel. Well, there are two options to edit this file. One is using the WordPress admin panel and another is using cPanel.

Today, you’re going to learn the cPanel method. It’s because many WordPress professionals disable the Code Editor from the admin panel for security reasons.

The concept is simple, to edit the file, you have to find it. Let me walk you through.

Locate the functions.php File in cPanel

If you have already used cPanel, you may not find it difficult. And I must also let you know that not every web hosting company has the same interface.

So don’t be alarmed when you see something different. The options in cPanel always remain the same, the web hosting companies modifies the design to match with their own color scheme.

Follow these steps.

Step 1

Login to your cPanel account
and look for the Files’ section. Click on the File Manager icon. Once you do it, make sure you have opened the public_html directory.

It’s also called the root directory because the data of the website is hosted here.

You can easily see all the files and folders of your website.

Note: If you’re hosting multiple websites on the single web hosting, you may need to open the folder of the website you want to edit.

Step 2

Search for the wp-content folder
because this folder consists of all the plugins, themes, and media files of your website.

Step 3

Once you open it,

you have to find the “themes” folder
 in which all of your themes are available. Whether you have activated any theme or it’s inactive, you can see it in this folder

Step 4

As you can see, there are two themes on my website. And I am going to show you to edit the functions.php file of the “twentyseventeen” theme.

Depending on the theme you want to edit, open it.

Step 5

Once you open it, you can easily find the functions.php file. Before you go further, I must remind you that if you add any wrong code to this file, it can break the whole website.

It’s better to take the backup of your whole website and its database. You can also backup your WordPress theme.

To edit this file, you can edit choose the Edit link shown in the main navigation menu or

you can just right-click and choose to Edit
.

A new tab will appear to you with all the codes.

Note: Edit this file only if you know what you’re doing.

Many people just copy and paste the code without verifying anything. There are many things to keep in mind. In the functions.php file, the PHP end tag is always open but it’s possible that you may find the closed tag in the code you copy.

Before you make any changes, it’s necessary that you should learn the basics of WordPress coding. Especially, about this file.

You wouldn’t want to break your website just to have an extra feature. If you’re not a techie person, I would suggest you use a plugin.

I mean there are thousands of plugin available in the official WordPress Plugins’ repository. You can easily find it.

It not, then edit this file carefully.

I Hope You Can Easily Find this File

In the last few years, I have realized that the functions.php file should be handy for every WordPress user. Most of the people don’t focus on learning the basics of WordPress which may be a problem in the future.

You can’t ask your tech guy every time you need to make any changes to your website.

It’s necessary to learn something yourself. The use of cPanel is mandatory these days. Whether you install WordPress or fix an issue, you need to use it.

I hope you can easily find the file. Just follow the above-mentioned steps and you will be good to go.

Conclusion

You should know that all the themes and plugins of your website are stored in the wp-content folder and that’s where you will find the functions.php file of your WordPress theme.

Before you edit, make sure everything is right and the code you’re going to paste doesn’t contain any malicious code. Copy the code from an authentic website.

Once you paste the code, save the changes.

 

Check out these top 3 cPanel hosting services:

HostArmada
$1.79 /mo
Starting price
Visit HostArmada
Rating based on expert review
  • User Friendly
    4.5
  • Support
    4.5
  • Features
    4.5
  • Reliability
    4.5
  • Pricing
    4.0
IONOS
$1.00 /mo
Starting price
Visit IONOS
Rating based on expert review
  • User Friendly
    4.5
  • Support
    4.0
  • Features
    4.5
  • Reliability
    4.5
  • Pricing
    4.3
Ultahost
$2.90 /mo
Starting price
Visit Ultahost
Rating based on expert review
  • User Friendly
    4.3
  • Support
    4.8
  • Features
    4.5
  • Reliability
    4.0
  • Pricing
    4.8

How to deactivate all your WordPress plugins at once from cPanel

While handling a WordPress website, you may encounter with many common WordP
4 min read
Max Ostryzhko
Max Ostryzhko
Senior Web Developer, HostAdvice CTO

How to Delete Extra Database Tables After Uninstalling a WordPress Plugin

Not all the plugins come with an option to delete all the settings
4 min read
Max Ostryzhko
Max Ostryzhko
Senior Web Developer, HostAdvice CTO

How to Edit the CSS for your WordPress Site Using the cPanel Hosting Control Panel

As you know, the design of a WordPress website is controlled by
4 min read
Avi Ilinsky
Avi Ilinsky
Hosting Expert

How To Edit Your WordPress Website's .htaccess file Using cPanel

There are many files and folders present in the WordPress direc
4 min read
Michael Levanduski
Michael Levanduski
Expert Hosting Writer & Tester
HostAdvice.com provides professional web hosting reviews fully independent of any other entity. Our reviews are unbiased, honest, and apply the same evaluation standards to all those reviewed. While monetary compensation is received from a few of the companies listed on this site, compensation of services and products have no influence on the direction or conclusions of our reviews. Nor does the compensation influence our rankings for certain host companies. This compensation covers account purchasing costs, testing costs and royalties paid to reviewers.
Click to go to the top of the page
Go To Top