How To Fix WordPress Downloading Index.php Instead Of Opening

How To Fix Wordpress Downloading Index.php

You are probably here because you are having this issue with your wordpress website downloading the file index.php instead of opening the site.

There is a simple solution for that Just follow step by step tutorial to solve the problem “downloading index.php”. 

This solution is also helpful for WordPress not opening or facing any problem like “access denied”, “site can’t be reached”, “site down” etc.

1). Update your server

First of all, you need to make sure that your server is up-to-date. If your server is up-to-date, the chances of a security breach are less.

To do that, you need to log in to your Cpanel and then go to the “software/security” section. You can log in with the username and password of the server. After login, you will see “updates for installed software on the” section, click the “update all software there” button.

2). Uninstall Cache Plugin from WordPress

If updating your server doesn’t solve the problem of wordpress downloading index.php instead of opening, then your next move is to remove any cache plugins you have installed.

Once you have removed any caching plugin, go ahead and check if you are still experiencing wordpress downloading index.php instead of opening issue on your website.

If you cannot access your WP admin area, use SSH or cPanel account. All you have to do is head over to the public_html > wp-content > plugins directory and delete them using the rm -rf plugin-folder-name.

3). Replace Complete .htaccess File

If your problem still persists after deactivating caching plugins, you can completely replace .htaccess files to solve the wordpress downloading index.php issue and other security breaches and access not provided issues, etc.

All you have to do is delete the .htaccess file from your server and then recreate a new one using the code below;

# BEGIN WordPress
<IfModule mod_rewrite.c>
  RewriteEngine On
  RewriteBase /
  RewriteRule ^index\.php$ – [L] RewriteCond %{REQUEST_FILENAME} !-f
  RewriteCond %{REQUEST_FILENAME} !-d
  RewriteRule . /index.php [L] 
</IfModule>
# END WordPress

This is the default wordpress .htaccess file code.

And this one should help solve the issue of wordpress downloading index.php instead of opening.

Leave a comment

Your email address will not be published.