Themes and layouts are some of the most important parts of your websites, are they not? I mean they are what get you your first impression!
When a user lands on the website,
he doesn’t see the content either your authority, the very first thing he notices within milliseconds is your theme and layout.
So yeah I’m sure you might be trying to learn How Can I edit the Header file without login in into my Cpanel, right? Now there might be instances when you might not have access to your Cpanel, or might not want to get into it but you might still need to edit your WordPress theme files, right?
That’s where this article comes in, I’d be showing you how to edit WordPress theme files without logging into the Cpanel! All you’d need is, your WordPress login details and that’s it.
Or if you were looking for solutions to Moving a SIMPLE WordPress site without CPanel, even then this piece might come in handy. It “doesn’t” let you move the WordPress website, but it does let you move the looks and feel of the theme without the cPanel.
How to Edit Theme Files Without Cpanel in WordPress:-
So okay in order to edit theme files without Cpanel, you’d first of all need to login to your WordPress back-end.
Once you’re in, click on Themes> Editor.
It would take you to the editor page, which consists of two parts. The editor is on the left panel.
And the files on the right sidebar.
Here you are, all you’ve got to do now is, select the file you want to edit. To explain better, just click on one of the files from the right-sidebar.
See? The codes of that specific file pop up in the editor pane. Now just edit them like any other code file, it’s like a notepad editor, and you can edit it similarly.
Looking for an easy to use page builder plugin? Then you much read this article about Beaver Builder review on Newsmartwave and know if this is the best page builder plugin for you.
What kind of Themes Can You Edit Using This Method:-
There are various kinds of themes, right? General Themes, E-commerce, single layout, Parent Themes, Child Themes, and whatnot.
Well, the good news is, this allows you to edit all and every kind of theme that there is. Even if you’re running an e-commerce store on WordPress and need to change the theme codes, you can edit it from there.
What you CAN’t Edit:-
It’s only a “theme-file” editor. Meaning you can edit every file, even the CSS that’s important with the theme, but that’s it.
This feature doesn’t allow you to make changes to sensitive files like .htaccess or robot.txt as these two are some of the most important files in the whole of the WordPress Installation.
So even if someone does get unwanted access to your WordPress back-end, all they can ruin is the Looks and layout, not the whole website.
Neither can you edit nor change any other folder or permissions? So in short the only files that can be edited are the theme files, no exceptions not at all.
“Keep in Mind” Points While Using this Method:-
As you have seen, you can edit the WordPress theme files from the “WordPress backend” itself, no Cpanel access is required.
Now it’s a good thing, but not always. So there are a couple of things you need to keep in mind:-
- Be Careful with whom you’re giving admin access to your website. Anyone with Admin level access can change the codes, and one wrong line of code can ruin the whole website to such a level that it might be impossible to bring the old site back.
- This method doesn’t pose any other threat to you, apart from the “layout and Design” thing. So the only thing you might lose if you make a mistake is the look and feel of your website, nothing else.
- As it’s not Cpanel, you can’t just “backup” the file before editing. So in case you make a mistake, you might have made it permanent. So make sure you “backup” the file for sure before editing it.
There’s no official in-built backup option for the WordPress theme editor, so we would have to do it manually. So here’s how to do it.
When you click on a file name and it pops up in the editor, select the whole code, and copy it. (Ctrl-A + ctrl C)
Then create a notepad file on your desktop, and name it exactly the same as the file name. For example, if you’re editing “comments.php”, make a notepad file that says “comments.txt” on your desktop. This is to make sure you don’t miss the codes up with each other.
And paste the codes you copied in that file.
Done! So now you have your backup! Go ahead and edit the files, if you mess things up and need to restore the file, just copy the files back from the Notepad and paste it in exactly the same file you copied it from!
- Related Post- CSS Hero WordPress theme Review
Final Words:- How To Edit Theme Files Without Cpanel In WordPress?
So that’s it folks on How to edit Theme files without Cpanel in WordPress. It’s no rocket science, in fact, the steps didn’t even need screenshots, but I just included them to make it clear for you guys.
If you liked this piece, I’d love it if you show your feedback in the comment box below. And also do let me know if you face some kind of problem or issue during the process.
I try my best to fix it from my end for you guys.
Quick Links