wordpress error permalink setting post name error 404-page not found

I have a wordpress site that when I change the permalinks in settings it gives me are error 404 page not found when I try to open the page. If I let the permalink to default no problem. When I change permalink to post name, then the error shows.  When I try setting month and name no problem.

I downloaded the plugin Google XML sitemap and when I try to open my site url sitemap.xml it shows error loading stylesheet: An unknown error has occurred (805303f4)

Thank you

Suply
suplyAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Zac HarrisSystems Administrator Commented:
Is this a locally installed wordpress? If you are using a local install you must make sure that the Apache Rewrite module is enabled.
0
suplyAuthor Commented:
Hello,

This is running on host, not local.

Thank you

Suply
0
Zac HarrisSystems Administrator Commented:
Ok, same thing. Make sure that Apache Rewrite module is enabled on your hosting providers server...
0
Cloud Class® Course: SQL Server Core 2016

This course will introduce you to SQL Server Core 2016, as well as teach you about SSMS, data tools, installation, server configuration, using Management Studio, and writing and executing queries.

suplyAuthor Commented:
The rewrite was enabled

# 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
0
Zac HarrisSystems Administrator Commented:
Ok next thing to check is to make sure that your .htaccess file is getting updated when you change the permalink structure. It should prompt you on the bottom of the page if it isn't.
0
suplyAuthor Commented:
When I change I get this message at the bottom

If your .htaccess file were writable, we could do this automatically, but it isn’t so these are the mod_rewrite rules you should have in your .htaccess file. Click in the field and press CTRL + a to select all.

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
0
Zac HarrisSystems Administrator Commented:
Ok so that means the file is not writable. You need to change the permissions on your .htaccess file to be something like 644. That should allow it to update. This is done using chmod.

Once you do that, the file should be able to be updated by Wordpress and the permalinks should work.
0
suplyAuthor Commented:
I already have permission please look at the screenshot.
Permissions-htaccess.png
0
Zac HarrisSystems Administrator Commented:
Yes, you have permission but Wordpress doesn't.
0
Zac HarrisSystems Administrator Commented:
Try setting it to 755 temporarily do the update then change it back to 644
0
suplyAuthor Commented:
It wont let me change to 755 on;y 744 when mode-user execute is checked, besides that I cant change any other number. Tried with 744 and wont write.
0
Zac HarrisSystems Administrator Commented:
Will it let you change the permissions to 766?
0
Zac HarrisSystems Administrator Commented:
Based on the error you provided, Wordpress cannot write to the .htaccess file. If you can fix those permissions you will fix your problem with the permalinks not working correctly.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
suplyAuthor Commented:
The way I worked this around was setting permalinks to post name the first 2 posts gave me error 404 so I removed these post and placed them as pages. The following post did not give errors and are read correctly.
0
Zac HarrisSystems Administrator Commented:
I'm happy you found a work around, however the root cause of this issue was that your .htaccess file was not writable. Having a hosted solution sometimes gets in the way with permissions however I'm sure they will set it correctly for you should the need arise in the future.
0
suplyAuthor Commented:
Thank you
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
WordPress

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.