How to Fix Missing Theme File Editor in WordPress

In general, wenot recommendedexpense or outlayBuilt-in WordPress Theme File Editorto modify the theme files as this can easily lead to website malfunctions. Many users find this method convenient and usually use it to make changes quickly. Recently, we receivedFeedback from some usersThey find themselves unable to find the theme file editor in the WordPress admin backend. In the article, we'll show how to get it back.

Images [1] - How to restore WordPress theme file editor: fix missing issues

Where did the theme file editor go?

We get a lot of messages from WordPress users that can't find the theme file editor in its previous location. It hasn't actually been removed - just its location has changed. If using a modern block theme, then the "exterior condition" under the menueditor (software)" option will open the site editor instead of the old theme file editor.

Images [2] - How to restore WordPress theme file editor: fix missing issues

This is because the WordPress core team believes that both menu items have "editor (software)" name, but the functionality was so different that such a setup would cause confusion. Therefore, they moved the theme file editor to "artifact" under the menu to avoid this confusion.

Images [3] - How to restore WordPress theme file editor: fix missing issues

However, in some cases, the theme file editor simply won't display.

This is usually due to security plug-ins or wp-config.php fileA setting in the editor disables the editor. These measures are usually taken to prevent accidental modifications or to protect the site from potential vulnerabilities. Understanding why the editor disappeared makes solving the problem easier. Next, we explain step-by-step how to find or re-enable it.

Find the Theme File Editor in the Modern Block Theme

Block themes use block editors for almost everything, from page layout to site-wide styling. While they offer great flexibility, they can also make some familiar features (like the theme file editor) harder to find.

If using a block theme, the theme file editor is no longer located in the "exterior condition" menu item. Instead, WordPress has moved it to the "Tools."The menu matches the new organization of the block theme.

Simply log in to the WordPress administration and navigate to "artifact"" "Theme File Editor"Menu.

Images [4] - How to restore WordPress theme file editor: fixing missing issues

Theme File Editor under the Tools menu
Upon entering this menu, the editor will look like it does in the Classic theme.

💡 Tip: It is recommended to back up the site before making any changes, just in case.

If in "artifact"The editor is not visible in the menu, don't worry. Next, let's take a look at other possible causes of the editor disappearing and how to fix them.

When the theme file editor is disabled

Sometimes the Theme File Editor fails to display because the WordPress Security Plugin or Manual Configuration has intentionally disabled it.

This is a common practice to protect websites from accidental modifications. We have encountered this many times when troubleshooting problems for our users, and it is usually relatively simple to resolve.

If you are using a security plugin like Sucuri, then you need to navigate in the WordPress admin backend to Sucuri Security " Settings Page.

Click "Hardening" tab, where one will find a file named "Disable Plugin and Theme Editor" option. If this option is enabled, click "Revert Hardening" buttonJust turn it off.

Images [5] - How to restore WordPress theme file editor: fixing missing issues

Reload the WordPress admin backend and the theme file editor should reappear.

If the theme file editor is still missing, then it may be that the wp-config.php file causes problems.

You need to use an FTP client orcontrol panels file manager to access the site files.

Open in a text editor wp-config.php file and search for the following line:

define('DISALLOW_FILE_EDIT', true);
  define('DISALLOW_FILE_EDIT', true);
define('DISALLOW_FILE_EDIT', true);

If you find this line, you can either delete it directly or remove its value from the true change into false. Always remember to save the changes and set theUpdated files are uploaded back to the serverThe

Once this is done, you can refresh the WordPress admin backend to see if the theme file editor has been restored.

Why is it bad to edit the theme file directly

While theme file editors may come in handy, it has been found that many users accidentally mess up their websites while editing the theme files directly. A small mistake in the code can also lead to a fatal error and an inaccessible website.

Another problem is that changes made directly to the theme files are overwritten when the theme is updated. It's even worse if it's a customized theme, which takes a lot of time to fix.

WordPress security is also an important factor - if the editor is left enabled, a malicious attack could modify your files after gaining administrative access to WordPress.

For these reasons, we recommend usingWPCodePlugins customize the code:

Images [6] - How to restore WordPress theme file editor: fixing missing issues

Why we recommend WPCode

WPCode enables administrators to add and manage custom code snippets without worrying about destabilizing the site. Code snippets can be easily enabled or disabled to avoid modifying theme or plugin files.

The reason we recommend WPCode:

  • Easily manage code snippets and custom CSS.
  • Built-in error handling to automatically disable problematic code.
  • Provides a large library of very useful code snippets.

We use the WPCode plugin to manage custom code on many of our sites.

Once activated, go to the WordPress administrator's backend in the Code snippets " Add snippet Page. Here, custom code snippets can be created or useful code snippets can be selected from the existing code base.

Image [7] - How to restore WordPress theme file editor: fix missing issues

I hope this post has solved your worries, and if you have any questions, you can leave feedback in the comment section.


Contact Us
Can't read the article? Contact us for free answers! Free help for personal, small business sites!
Tel: 020-2206-9892
QQ咨询:1025174874
(iii) E-mail: info@361sale.com
Working hours: Monday to Friday, 9:30-18:30, holidays off
© Reprint statement
This article was written by Banner1
THE END
If you like it, support it.
kudos73 share (joys, benefits, privileges etc) with others
commentaries sofa-buying

Please log in to post a comment

    No comments