Question

Wordpress Permalinks not working on Ubuntu 14.04

  • Posted September 24, 2014

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 domain.com/?p=123, it changes the url to the correct domain.com/month/day/post-title, however it takes me to the apache 404 page then.

Any help is appreciated.

Subscribe
Share

To clarify, the problem in this scenario is that .htaccess is not enabled. To fix that, you add AllowOverride All for your site’s directory. In my case, I did that in apache.conf.

This comment has been deleted


Submit an answer
You can type!ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

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.

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

Find:

<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!

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
	ServerName broseph.com.au
	
	DocumentRoot /var/www/broseph.com.au/public_html
	<Directory />
		Options FollowSymLinks
		AllowOverride None
	</Directory>
	<Directory /var/www/broseph.com.au/public_html>
		Options Indexes FollowSymLinks MultiViews
		AllowOverride All
		Order allow,deny
		allow from all
	</Directory>

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

</VirtualHost>
  • 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

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
	ServerName broseph.com.au
	
	DocumentRoot /var/www/broseph.com.au/public_html
	<Directory />
		Options FollowSymLinks
		AllowOverride None
	</Directory>
	<Directory /var/www/broseph.com.au/public_html>
		Options Indexes FollowSymLinks MultiViews
		AllowOverride All
		Order allow,deny
		allow from all
	</Directory>

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

</VirtualHost>
  • 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

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
	ServerName broseph.com.au
	
	DocumentRoot /var/www/broseph.com.au/public_html
	<Directory />
		Options FollowSymLinks
		AllowOverride None
	</Directory>
	<Directory /var/www/broseph.com.au/public_html>
		Options Indexes FollowSymLinks MultiViews
		AllowOverride All
		Order allow,deny
		allow from all
	</Directory>

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

</VirtualHost>
  • 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

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
	ServerName broseph.com.au
	
	DocumentRoot /var/www/broseph.com.au/public_html
	<Directory />
		Options FollowSymLinks
		AllowOverride None
	</Directory>
	<Directory /var/www/broseph.com.au/public_html>
		Options Indexes FollowSymLinks MultiViews
		AllowOverride All
		Order allow,deny
		allow from all
	</Directory>

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

</VirtualHost>
  • 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

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
	ServerName broseph.com.au
	
	DocumentRoot /var/www/broseph.com.au/public_html
	<Directory />
		Options FollowSymLinks
		AllowOverride None
	</Directory>
	<Directory /var/www/broseph.com.au/public_html>
		Options Indexes FollowSymLinks MultiViews
		AllowOverride All
		Order allow,deny
		allow from all
	</Directory>

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

</VirtualHost>
  • 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

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
	ServerName broseph.com.au
	
	DocumentRoot /var/www/broseph.com.au/public_html
	<Directory />
		Options FollowSymLinks
		AllowOverride None
	</Directory>
	<Directory /var/www/broseph.com.au/public_html>
		Options Indexes FollowSymLinks MultiViews
		AllowOverride All
		Order allow,deny
		allow from all
	</Directory>

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

</VirtualHost>
  • 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

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
	ServerName broseph.com.au
	
	DocumentRoot /var/www/broseph.com.au/public_html
	<Directory />
		Options FollowSymLinks
		AllowOverride None
	</Directory>
	<Directory /var/www/broseph.com.au/public_html>
		Options Indexes FollowSymLinks MultiViews
		AllowOverride All
		Order allow,deny
		allow from all
	</Directory>

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

</VirtualHost>
  • 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

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
	ServerName broseph.com.au
	
	DocumentRoot /var/www/broseph.com.au/public_html
	<Directory />
		Options FollowSymLinks
		AllowOverride None
	</Directory>
	<Directory /var/www/broseph.com.au/public_html>
		Options Indexes FollowSymLinks MultiViews
		AllowOverride All
		Order allow,deny
		allow from all
	</Directory>

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

</VirtualHost>
  • 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

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
	ServerName broseph.com.au
	
	DocumentRoot /var/www/broseph.com.au/public_html
	<Directory />
		Options FollowSymLinks
		AllowOverride None
	</Directory>
	<Directory /var/www/broseph.com.au/public_html>
		Options Indexes FollowSymLinks MultiViews
		AllowOverride All
		Order allow,deny
		allow from all
	</Directory>

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

</VirtualHost>
  • 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