Something blocks my php files from executing in wp-content folder including plugins and themes folders. If I create a new php file in wp-content, and try to access it like this /wp-content/test.php, it get's redirected to a not found page.

I've already check file permissions and .htaccess and couldn't find anything wrong. Any ideas?

  • code of plugins files go in wp_content/plugins/nameOfPlugin/file.php and not directly in wp_content – mmm Apr 5 '17 at 18:38
  • that's true, the problem is it does not work for any plugin for any path that includes wp-content folder. the above is just a simplification – gradosevic Apr 5 '17 at 18:59
  • Can you check if you are able to execute file through command line? – Saurabh Apr 5 '17 at 19:55
  • Unfortunately, just having FTP access to it. It looks like index.php can be only run directly, other files are somehow restricted, can it be some setting on Apache? – gradosevic Apr 6 '17 at 11:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.