Question: I have created a folder within WordPress public\_html folder and created a test.php file in it as below. 

www.mysite.com/myfolder/test.php

When I navigate to this url, I get page not found 404 error. All other files in myfolder, e.g. test.txt load without any issues. It's just php files that are not running. Could anyone please help?

My .htaccess file is

```
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>

# END WordPress

```

Answer: 
WordPress has its own .htaccess that is probably treating your URI as some sort of "Search Engine Friendly" thing, and translating it into some other format that WP is expecting. For example, <http://www.mysite.com/myfolder/test.php> might get rewritten to something like <http://www.mysite.com/myfolder/index.php?target=test%25php>. That would give a 404 error from within WP (not a real server 404 error). Perhaps something can be done from within WP's configuration, or you could modify the .htaccess to tell it specifically not to rewrite test.php.
Please check file-folder permission of myfolder. It should not be 777 instead it should be 755 on your server.

Please refer [Wordpress php file execution](https://stackoverflow.com/questions/8811938/wordpress-php-file-execution)