Question

Why is wordpress site download file instead displaying site?

Hi,

Recently I upgraded to Ubuntu 16.04, i struggled to restart Apache2 but finally solved, but now website is downloading instead of display, even wp-admin page also downloading.

Regards, Raja


Submit an answer


This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

KFSys
Site Moderator
Site Moderator badge
March 2, 2020
Accepted Answer

Hi @rajviswas,

The download behavior happens when the server, WebService doesn’t know what to do with the file and just provides you with it to download. This usually happens when your PHP interpreter on your droplet is offline or if you have added some rule in your .htaccess file which changes the default behavior.

To test this, remove the .htaccess file of your website located in your DocumentRoot and see if the website is going to start loading, I bet it will start.

Then if you wish some help with debugging exactly which line causes this issue, post your .htaccess file here and we’ll be able to pinpoint it for you.

Regards, KDSys

KFSys
Site Moderator
Site Moderator badge
March 9, 2020

Hi @rajviswas,

Thank you for the confirmation, in that case, please type in the following command to install the MySQL extension for php 7.4

sudo apt-get install php7.4-mysql

You might not have all the other extensions as well, so you’ll most probably need to install them the same way. Here is an example how to do it

sudo apt-get install -y php7.4-{bcmath,bz2,intl,gd,mbstring,mysql,zip}

Regards, KDSys

Try DigitalOcean for free

Click below to sign up and get $200 of credit to try our products over 60 days!

Sign up

Become a contributor for community

Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.

DigitalOcean Documentation

Full documentation for every DigitalOcean product.

Resources for startups and SMBs

The Wave has everything you need to know about building a business, from raising funding to marketing your product.

Get our newsletter

Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.

New accounts only. By submitting your email you agree to our Privacy Policy

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Get started for free

Sign up and get $200 in credit for your first 60 days with DigitalOcean.*

*This promotional offer applies to new accounts only.