How to disable the ability to change files in the WordPress admin

By default, the WordPress admin has the ability to modify theme files or plugins in AppearanceEditor. But there may be situations where you need to show the admin to a customer or editor. If you don’t want any of them to be able to change your files, you should add this line to the wp-config.php file, which is in the root of the site.

// Disable the ability to edit files in the admin panel for themes and plugins.
define( 'DISALLOW_FILE_EDIT', true );

How useful is the publication?

Click on a star to rate it!

Average score 5 / 5. Number of grades: 1

No ratings yet. Rate it first.

Similar posts

How to exclude posts with parent post in wp_query, WordPress

To exclude posts that have a parent (i.e., child posts) in a WP_Query request, you can use the post_parent argument. This argument controls whether the post has a parent or not. To exclude child posts, set the condition post_parent => 0, which means that only top-level posts (posts without a parent) will be included in…
Read more