Wordpress Permalinks not working on Ubuntu 14.04

I have followed this guide, and everything worked correctly except that I cannot change the Wordpress permalink setting. I have followed the guide, and other solutions to questions here, but none are working for some reason. On WP, when I change the permalinks, and go to the original, it changes the url to the correct, however it takes me to the apache 404 page then.

Any help is appreciated.

Show comments

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.

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.

I had this issue with pretty permalinks myself, and the solution was to edit my vhosts conf file for that site. Here’s what worked for me:

<VirtualHost *:80>
	ServerAdmin webmaster@localhost
	DocumentRoot /var/www/
	<Directory />
		Options FollowSymLinks
		AllowOverride None
	<Directory /var/www/>
		Options Indexes FollowSymLinks MultiViews
		AllowOverride All
		Order allow,deny
		allow from all

	ErrorLog ${APACHE_LOG_DIR}/error.log
	CustomLog ${APACHE_LOG_DIR}/access.log combined

  • Also make sure your .htaccess file has the proper permissions for WP to write to it. You’ll see an error if it doesn’t.
  • FYI: conf files are in /etc/apache2/sites-available
  • Don’t forget to restart apache after editing the conf file: sudo service apache2 restart

My issue was from making the update from Ubuntu 12.04 to 14.04 was that my apache2.conf was not correct configured:

In terminal type:

sudo gedit /etc/apache2/apache2.conf


<Directory /var/www/>

And make sure the AllowOverride directive is set to All.

After I made that change I could use custom permalink structures in Wordpess again, hope this helps anyone as it did me!

you have to enable mode_rewrite.c for apache more info after enable mode_rewrite , make sure you have .htaccess file in the public_html :

# 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

and restart the apache server

sudo service apache2 restart