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?
Yes the
.htaccessfile can prevent proper operation/access of PHP files in your sub-directory. Try removing the.htaccessfile completely and report the results.I have seen this issue with bogus
.htaccessfiles.