phpwordpressmodx

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.

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


Solution

  • 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.