I uploaded a php file in the root directory of my WordPress site that I need to be able to access directly through the browser.

When I do, it looks like WordPress takes over, triggers a 404, and shows the error page.

It only occurs for php files. I tried with html and txt files and I can view them just fine. Any ideas on what’s going on? How can I prevent this from happening?

The structure is this

/root
/folder
/file-that-throws-404.php
/wp-admin
/wp-content
.
.
.

Read more here: Prevent 404 when navigating to single php file


Solution:

If you know the solution of this issue, please leave us a reply in Comment section, to update the question.


Wordpress related questions and answers: