Wordpress website downloads file

Wordpress website downloads file

wordpress website downloads file

All page builders. WP File download works with all other major content builders: ACF, Site Origine, Themify builder, Elementor and Live Composer page builders. Sounds to me like you don't have.php in your Apache mime.types file. What happens is that each HTTP request has a header that says what MIME type the. www.godaddy.com › help › download-your-site-files-32414.

Wordpress website downloads file - with you

How to Fix WordPress Downloading Index.php Instead of Displaying Site

“WordPress downloads a compressed file instead of opening index.php or when i try to access my wp-admin”.

This was a question asked to us by one of our readers and he wanted to know how to solve it.

As I have no idea how was this happening so I kept the question aside in my questions list until it happened with my blog.
So this made me freak out as I lost access to my wp-admin, although I have a daily backup of my blog. But it’s not a choice to restore my blog as its a long list of work to be done and as for others, they don’t have a daily backup.

 

So just like a normal user I deactivated all my plugins through the backend of my hosting and tried to access the wp-admin, But this didn’t seem to work.
So I tried to restore my website theme to default twenty fifteen but this time so I was out of luck and now I was worried.

I worked fine on my website all day yesterday, but this morning it tried to download the index.php instead of opening it like a browser normally does. .

Now as I know I have tried:

  • Renaming my theme to old-[name-of-theme]
  • Renaming plugin folder to old-plugins (to disable them all)
  • Clearing the cache for Firefox, Safari, and Chrome.

Nothing worked.
I google and found some answers like

delete AddHandler application/x-httpd-php52 .php .php5 .php4 .php3

No idea how that got there! But I got my solution.

 

Method to Fix 

But here’s what I did and It started working within 5 minutes and it was easy.
I accessed my .htaccess in cPanel and also kept a backup in case I messed the config codes. (Please Keep a backup).

If for any reason you can’t find .htaccess on your WordPress installation root directory, then Click File Manager and make sure to tick Show Hidden Files (dotfiles) and click Go.
The .htaccess should show up where wp (wp-admin, wp-content, wp-includes) is installed, which is your WordPress root directory.

I studied the code and I found some extra lines of code messing with my WordPress. I deleted the extra code and it started working.

For those who are not programmers for them follow the steps below:

  1. Open and edit .htaccess – Have a backup before editing
  2. Delete all the codes inside it
  3. Now copy the code below this and paste & save it
  4. It should be working now, you can access your WordPress admin.
Options +FollowSymlinks RewriteEngine On RewriteBase / RewriteCond %{HTTP_HOST}//s%{HTTPS} ^www\.(.*)//((s)on|s.*)$ [NC] RewriteRule ^ http%3://%1%{REQUEST_URI} [L,R=307] AddType x-mapp-php5 .php # 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> # add a trailing slash to /wp-admin RewriteCond %{REQUEST_URI} ^.*/wp-admin$ RewriteRule ^(.+)$ $1/ [R=301,L] # END WordPress

Hope this helps someone, and have a great day!!!

Conclusion

The reason why your index.php is downloaded is that of your caching plugin or feature in your host which adds a few line of codes that makes your WordPress fast as it compresses the file but in some cases, wp-admin is also cached which makes it impossible to access.

So just edit your .htaccess and paste the above code given and your blog is again ready to rock

If you have any queries, feel free to ask below in the comments. 

AuthorNiraj Kashyap

Editorial Staff at BloggerSprout is a team of WordPress experts led by Niraj Kashyap. Page maintained by Niraj Kashyap. For any queries, Visit AskNiraj.com.

Related Posts

Источник: [https://torrent-igruha.org/3551-portal.html]

Wordpress website downloads file

1 thoughts to “Wordpress website downloads file”

Leave a Reply

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