Are you wanting to customize the look of your WordPress website? If so, you may need to edit your theme’s files directly. However, the theme file editor is disabled by default for security reasons. Don’t worry, this article will show you how to enable it step-by-step.

Getting Started

First things first, log into your WordPress admin area. You can also do this by going to and entering your credentials.

Locate the Editor

Once logged in, head to the Appearance menu on the left-hand side. Next, click on the Editor link. On this screen, you’ll likely see a notification about the file editor being disabled.

Two Ways to Enable

There are two main ways you can enable the theme file editor – through the admin screens or by editing a core WordPress file directly. Let’s go through each method.

Method 1: Admin Screens

Click the Link
On the Editor screen, look for the notice about the file editor being disabled for security reasons. Click the link in that notice.

Enter Credentials
This will take you to a new screen prompting you to enter your username and password again. Go ahead and do so.

Confirmation Message
After entering valid credentials, you should see a message confirming the file editor has now been enabled. Congratulations!

Return to Editor
Head back to the Editor screen under Appearance. All those previously grayed-out fields for theme files should now be editable.

Method 2: Editing wp-config.php

Connect via FTP/CPanel
For this method, you’ll need to access your site’s files using an FTP client or your hosting account’s cPanel.

Find wp-config.php
Navigate to the folder containing your WordPress installation. Locate the wp-config.php file and open it in a text editor.

Update File Line
In the file, find this line:

define('DISALLOW_FILE_EDIT', true);

Change it to:

define('DISALLOW_FILE_EDIT', false);

Save Changes
Save your changes to the wp-config.php file, upload it if accessing via FTP, and the file editor should now be enabled.

Using the Editor Responsibly
With the theme file editor active, you can directly modify code like style.css, functions.php and template files. However, use caution as incorrect edits can break functionality.

Back Up First
Before making changes, create a full backup of your website files and database. That way you can restore if issues occur.

Preview Changes
WordPress has a handy Theme Preview link to test modifications before updating the live theme files.

Consider a Child Theme
For major customizations, creating a child theme is better than editing the parent theme directly. Changes won’t get overwritten on updates.

Discover: How To Reset Your AirPods

In Summary
The built-in theme file editor gives you code-level control over your WordPress site’s appearance. While handy, use it carefully and create backups first. Most importantly, have fun customizing your website!


Leave a Reply

Your email address will not be published. Required fields are marked *