500 internal sever error after disallowing file editing


#1

Hello, I looked around and didn’t find anything similar.

One of the ways I secured my Wordpress site was to disallow file editing in my .httaccess file with the following command. define(‘DISALLOW_FILE_EDIT’, true).

My site then throws a nasty 500 internal error, when I comment out or delete the line the page loads just fine.
Does Cloudflare require write permission to Wordpress files or a file?

Anyone have any idea’s why this happens and how I can work around it? Other than allowing file edit?


#2

Do you have a semicolon ; after that entry?


#3

Thanks for your reply.

Yes I do, sorry did not grab that in the copy. Here is the exact code.

define(‘DISALLOW_FILE_EDIT’, true);


#4

Cloudflare doesn’t touch any files on your server.

Try to use this line within wp-config.php instead of a htaccess file.

You may also check if there’s no plug-in that needs permissions to edit something. This can be easily checked by renaming or moving the plug-in folder away from your WP installation one after another.

Oh: backup!

Reference:
https://codex.wordpress.org/Editing_wp-config.php#Disable_the_Plugin_and_Theme_Editor


#5

This topic was automatically closed after 14 days. New replies are no longer allowed.