wordpresss on 18.04 wp admin pages just downloads a php file

Every time i click on pages or all pages in wp-admin, I download a php file instead of viewing the pages. I’ve heard this can be a htaccess file issue but can’t locate it to edit and debug. I’ve disabled all plugins and still nothing but a file download and when i open it is has all sorts of stuff i don’t really understand but seems to have to do with a notification for permission of something.

I’m brand new to ubuntu and linux but learning commands like nano to view or edit docs in the console.

I tried to locate the htaccess but the main locations didn’t have any.

I think i need some help.

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.

Site Moderator
Site Moderator badge
July 29, 2019
Accepted Answer


You can create a new .htaccess file in the WordPress main directory. You can use the default WordPress .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]
# END WordPress

Let me know how it goes.


Ok last night i did the file changes and then cleared cache and cookies and it worked! Thanks so much! Now I have to fix this nginx problem lol



it is working in Edge but not in Chrome???

Any ideas?

Try DigitalOcean for free

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

Sign up

Get our biweekly newsletter

Sign up for Infrastructure as a Newsletter.

Hollie's Hub for Good

Working on improving health and education, reducing inequality, and spurring economic growth? We'd like to help.

Become a contributor

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

Welcome to the developer cloud

DigitalOcean makes it simple to launch in the cloud and scale up as you grow — whether you're running one virtual machine or ten thousand.

Learn more
DigitalOcean Cloud Control Panel