Plesk for Windows
Plesk for Linux
kb: technical
ABT: Group B
Applicable to:
- Plesk
- Plesk for Linux
- Plesk for Windows
Symptoms
- WordPress admin dashboard can not be opened for a Plesk domain. The
wp-login.php
file is being downloaded instead of opening. -
Opening website leads to the
index.php
being downloaded instead.
Cause
PHP support is disabled for the example.com
domain in Domains > example.com > PHP Settings.
Resolution
Enable the PHP Support for the example.com
website in one of the following ways:
via Plesk Graphical Interface
-
Navigate to Domains > example.com > PHP Settings.
-
Select the PHP Support checkbox and press the OK button:
via Command Line Interface (CLI)
- For Plesk for Windows, additionally start the Command Prompt.
-
Execute the following command:
Note: change the "example.com" domain in the command below to the correct one
# plesk bin subscription -u example.com -php true
Comments
8 comments
I've updated to Plesk 18.0.30
i have the same problem with downloading the PHP Files which is really a security risk!!!
PHP was enabled PHP-FastCGI switched to PHP-FPM no success.
I'm having the same issue with one domain we are hosting. It's downloading an empty file with no extension. I've rebooted, change handlers, all components are updated. Is there any solution that works?
Another Update from my side: Currently i am doing support for 4 Plesk servers and another server started showing this behavior "Instead of showing a webpage downloading a file with is called "Download". The solution was to disable the nginx Cache for this site, now it works. Neither a service nor a server restart helped... So it seems there is something funny going on with the nginx caching. Since i disabled it it works like intended again.
Just thought i let you know :)
Hello Patrick Hofmann
Maybe this happens during high load. There's a possibility that solution from this article would help: https://support.plesk.com/hc/en-us/articles/214528405
Jan Bludau
Try this article: https://support.plesk.com/hc/en-us/articles/115002684014
Patrick and Jan, in case these solutions won't help, submit support requests to Plesk or our partner depending on where the license was purchased.
I had the same problem this week after migrating a Wordpress site into Plesk. Am using Plesk's WP Toolkit and essentially default settings.
What worked for me was clearing the cache in my browser.
I have a hunch it's to do with accessing the site while the PHP interpreter is down, or restarting, and/or possibly NGINX caching the contents of the index file while the PHP interpreter is down, and then your browser (Chrome in my case) caches this file, and serves it up each time you try to access. Using an incognito window, or a different browser, doesn't trigger the download.
It's worrying that this can even happen in the first place though.
Since a year and a half has gone by since the last comment, I'm assuming Plesk has not addressed this?
I have the same problem from time to time, its working normally for weeks, and suddenly a php FIle is downloaded instead of showing the website... Restarting Apache normally helps, but its disturbing... could there be another cause? I suspect something cache related. When it happens it happens on several sites, all WordPress.
Well for me the files are empty, so at least its not a securety risk...
I will take a look at the max children settings, it sounds somewhat plausible, espevcially as it is gone after a restart of apache. However i did not see this message in the logfiles.....
Thanks for pointing this out!
Hello Michael Hall I see you already tried all basic things we might suggest, hence please create a request to support to check the issue: https://bit.ly/32irmsk
Please sign in to leave a comment.