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] 
# 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.

By Kevin

Meet Kevin, a seasoned WordPress developer and blogger with a passion for fixing website issues. With over 5 years of experience in web development, Kevin has a deep understanding of WordPress CMS and has helped numerous businesses build and optimize their online presence. Kevin's love for WordPress began when he created his first website using the platform. Since then, he has honed his skills in web development, specializing in WordPress. His expertise includes custom theme development, plugin customization, and website optimization. As a blogger, Kevin is dedicated to sharing his knowledge and experience with others. When he's not coding or writing, Kevin enjoys hiking and exploring the great outdoors.

Leave a comment

Your email address will not be published. Required fields are marked *