Problem with changing Permalinks in WordPress (.htaccess)

Diviance

Regular Member
Joined
Jan 21, 2012
Messages
203
Reaction score
47
Hello everyone,

I have a problem with changing the permalinks of a WordPress website of mine.
When i want to change the permalinks structure in the Settings, i get a notification that i have to change my .htaccess file and add the following code.

Code:
<IfModule mod_rewrite.c>RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>

But when i'm looking for the .htaccess file of my website in the FTP, i don't see a .htaccess file.
When i create one, and add the code above, i get an error on the website, and site doesn't work anymore.

Can someone please help me change the permalinks?

Thanks!
 
hi i think i had the same problem
you can try to give wp, apache user rights so wordpress update .htaccess itsself
chown -R apache: /var/www/wordpress-site-path/
 
Thanks for your reply!

Do i have to 777 the path?
 
Got it.

Created a .htaccess file and put on the FTP of my website.
 
That's due to improper group permissions in your server. You might not be able to upload pictures too for the same reason. TO fix this, login to your SSH client with sudo permission and type chown -Rv username:apache /path/to/www
Apache group might be different depending on your server and it can sometimes be wwwroot or something else. Check the group first.
 
Thanks for your reply!

It was however already fixed. I created a .htaccess file and placed it in the root. I was able to upload pictures. Everything is fixed now :). Thanks again.
 
Back
Top