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.
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.
Once you open it,
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.
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
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.
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:
- Click here to get the best wordpress hosting specialized for wordpress.