PHP files not executing when placed in a subdirectory

I’m trying to transfer a WordPress website into a client’s server. The existing website of the client is run in MODX (a php-based CMS). I have created a subdirectory in the root called “new” and put my WordPress files in there so I can first install it there and if everything looks good, move it to the root.

However, the problem is that I can’t run php files from that sub directory. Every time I navigate to a file, the browser downloads the file instead of running it. I can run files from the root just fine.

Read More

Anybody knows what the issue might be? Can something in the .htaccess prevent files from running from a sub directory?

Related posts

Leave a Reply

2 comments

  1. Yes the .htaccess file can prevent proper operation/access of PHP files in your sub-directory. Try removing the .htaccess file completely and report the results.

    I have seen this issue with bogus .htaccess files.