File download opens when logging into my WordPress website

I have a strange problem with my WordPress website. When I am trying to log in, a file download window opens which downloads an empty file with the name download. That's really urgent. Hopefully, somebody can help me here out.

tuckeranddale's picture

Brief Summary Why WordPress Tried To Download File Instead of Load Site


The issue could be brought about by utilizing invalid/erroneous php/php.ini handler .htaccess code in the root .htaccess record. 

This was my concern. 

There could have been a php/php.ini handler code in the wp-administrator .htaccess record when the wp-administrator .htaccess document ought not to have any php/php.ini handler code in it. 

The php/php.ini handler .htaccess code should just be in the root .htaccess record. In the event that that was the situation, I would have taken a stab at erasing the wp-administrator .htaccess document and check whether that tackled the issue. 

There could be a .htaccess document higher up in the facilitating account organizer structure that has invalid php/php.ini handler .htaccess code in it. 

That is the thing that I initially checked for in sync 1. 

Another issue could be that the facilitating supplier was overhauled and not designed effectively. 

I figure this shouldn't be your first decision. 

There are a couple of different reasons why you may have run into this issue, however, I think this is a decent beginning to investigating the issue.

Vote the answer: 
Average: 4 (1 vote)
Codemaster's picture

Update your server and Plesk

I had also the same issue with one of my WordPress websites. Indeed I had a problem with a wrong PHP handler caused by an unsuccessful automatic upgrade of my Plesk installation. 


I suggest you update all plugins, the server, and also Plesk so that all software in use is up to date. I also updated my PHP version to 7.4 newest version. 


Additionally, to this I changed the PHP handler to FastCGI in the Plesk configuration. This worked for me. Now I can log in at my WordPress website again without having the problem that some file download is opening instead of login.

Vote the answer: 
Average: 5 (1 vote)
Codebutcher's picture


The issue could be any number of variables, yet what I've to be one of the most well-known issues is that the host has wound up changing something about Apache just as the form of PHP running the server and has either picked not to tell the client or the data has not been given to me. 

Whatever the case, this is the manner by which I've been settling this issue. On the whole, note that… 

A large number of the establishments that I've been working with are utilizing more seasoned variants of WordPress, 

The hosts on which the destinations are running are not really "top-level" has. 

All things considered, suppose the default .htaccess record resembles this:


Nothing strange. Be that as it may, if the server has made changes to the web server and has, state, empowered the PHP5 module, at that point you may need to add an order to the record educating the server to utilize a handler for PHP5:


Spare the document, transfer it, and you should (read: might) be a great idea to go. I don't have the foggiest idea whether this will take care of your specific issue, however I've witnessed this a couple of times now and this is by all accounts the fix particularly when working with more seasoned (that is, pre-4.0) renditions of WordPress. 

For the individuals who are interested, the explanation this works is that you're teaching the web server to utilize a PHP5 handler to deal with demands for PHP records. In the event that, for reasons unknown, the host has been updated and not designed effectively, this is one approach to give a manual fix.

Vote the answer: 
Average: 4 (1 vote)