Question

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
Answer a question...

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.

alexdo
Site Moderator
Site Moderator badge
July 29, 2019
Accepted Answer

Hello

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]
</IfModule>
# END WordPress

Let me know how it goes.

Alex

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

Want to learn more? Join the DigitalOcean Community!

Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.

OK

So…

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

Any ideas?