How To Avoid Download Web Page Instead Of Display In WordPress

My website is a WordPress website hosted by bluehost.com. These days i found that when i browse a web page, the browser do not display the web page content but download the page as index.html. This confused me some days. After investigate for a long time, i finally find the method to resolve this problem.

1. Remove AddHandler In .htaccess File.

  1. Go to your website’s public html root folder ( such as  /home1/***/public_html ) .
  2. Open and edit .htaccess file.
  3. Remove below AddHandler code ( those code maybe added by some WordPress plugin such as wp super cache when install or uninstall the cache plugin) by comment it.
    # BEGIN WordPress
    

    # AddHandler application/x-httpd-php70s .php

  4. Browse the web page again, then you can find the error fixed. If still not fixed then ask your WordPress provider for help.
  5. If above action do not take effect, you can first make a copy of original .htaccess file to .htaccess_old to backup it. And then remove all content in .htaccess file, and then just save below data in .htaccess file.
    # 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
  6. If above action still do not take effect, then ask your VPS host company support to fix it.

Leave a Comment

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

This site uses Akismet to reduce spam. Learn how your comment data is processed.