Despite how good your WordPress site may look and function, you’ll still feel the need to make changes to your website theme. In order to tweak anything in your theme, you’ll need to edit the PHP files.
WordPress comes with a built-in editor – The Theme Editor – that allows editing all the files from within your site’s admin menu when accessed in a browser online. Or else, you can edit your WordPress files and save them on your local system, and later upload them to the site via an FTP client.
In this post, we’ll discuss the process of editing the files and ultimately your theme with admin menu.
To edit your files and website theme accurately, there are few important considerations worth considering:
1. Don’t Forget to Create a Backup
Often making even minor changes to your site’s core files can result in breaking the website. And so, it is highly recommended that you must create a backup of your site, including all your files. Doing so, will help you restore your site back to its original form if its damaged during the process of editing your WP theme.
2. Familiarize Yourself With File Permissions
You can make changes to the file permissions using FileZilla or any other FTP client. And then,
Open up the cPanel of your FTP client, and navigate to Files → File Manager. Simply press the “Go” button provided at the button of the page as soon as the “Directory Selection” pop-up becomes visible.
From the pop-up box, you just need to change the numeric value in the textbox as shown in the image below:
3. Edit Files Utilizing a Text Editor
As you may know, WYSIWYG editors generate messy code that is difficult to read. But, using text editors help in writing and editing plain text with no need for formatting. When searching for a text editor avoid using a Word Processing Program as it adds unwanted code or other changes that can break a file.
Fortunately, there are plenty of great text editors over the web that not only helps in making edits to files outside the WordPress editor, but also provides syntax highlighting, auto-completion, and other features.
Editing WordPresss PHP Files and Theme
When it comes to editing WordPress PHP files to modify your theme, you can make changes to each file from within your browser using any one of the two WordPress built-in editors, namely: Theme Editor and Plugin Editor.
|Fig. Twenty Fourteen Theme Editor Screen|
Some Important Considerations
• Just above the list of all WordPress files in Twenty Fourteen theme, you can see a drop down menu which gives users the ability to switch among the installed themes (both active and inactive themes). Some users usually become confused presuming that selecting some other theme from the drop down menu will activate that theme. But that’s a wrong notion.
It merely opens up the files of that theme in the editor – that you wish to edit.
Remember, to activate the theme you need to hit the activate option by navigating to Appearance → Themes.
Functions.phpfile: Help Make Changes to the WordPress Theme
To implement changes in your WordPress site’s theme, you’ll most likely have to make edits in the functions.php file. But remember, in case you don’t know how to code, it is better that you should avoid using the Theme Editor for making edits to the
That’s because users often edit functions file simply by pasting any code available online. But, pasting the code in an inaccurate manner can get you locked out of your website.
A much better alternative is to seek professional assistance (ideally services of a WordPress developer) having enough experience in handling web development projects.
Remember, it is pretty easy to make tweaks to the theme. Just pasting code found over the web can help assist you in performing the necessary alterations. But you need to stay careful when making any changes to the core files in WordPress or it might break the site.
Thus, it is advised you should consider using a child theme for making the changes. Once you’re satisfied with the changes, you can implement them in your parent (primary) WP theme.