I followed the guide on installing Wordpress on Ubuntu 12. Everything is working fine, except for when I change my permalink structure to Month/Post Name. The main blog page works, but post links throw a 404 error.
I tried a few things:
Is there something else I’m missing here to get this working?
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.
Permalink Problem
Inside of this file, we want to change all things.
sudo nano /etc/apache2/sites-available/000-default.conf
000-default.conf - should look something like this:
<VirtualHost *:80>
ServerAdmin webmaster@localhost
DocumentRoot /var/www/html
<Directory /var/www/html/>
Options Indexes FollowSymLinks
AllowOverride All
Require all granted
</Directory>
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>
When you are finished, save and close the file.
Next, we need to enable the rewrite module, which allows you to modify URLs. You can do this by typing:
sudo a2enmod rewrite
After you have made these changes, restart Apache:
sudo service apache2 restart
Permalink Problem
Inside of this file, we want to change all things.
sudo nano /etc/apache2/sites-available/000-default.conf
000-default.conf - should look something like this:
<VirtualHost *:80>
ServerAdmin webmaster@localhost
DocumentRoot /var/www/html
<Directory /var/www/html/>
Options Indexes FollowSymLinks
AllowOverride All
Require all granted
</Directory>
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>
When you are finished, save and close the file.
Next, we need to enable the rewrite module, which allows you to modify URLs. You can do this by typing:
sudo a2enmod rewrite
After you have made these changes, restart Apache:
sudo service apache2 restart
Permalink Problem
Inside of this file, we want to change all things.
sudo nano /etc/apache2/sites-available/000-default.conf
000-default.conf - should look something like this:
<VirtualHost *:80>
ServerAdmin webmaster@localhost
DocumentRoot /var/www/html
<Directory /var/www/html/>
Options Indexes FollowSymLinks
AllowOverride All
Require all granted
</Directory>
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>
When you are finished, save and close the file.
Next, we need to enable the rewrite module, which allows you to modify URLs. You can do this by typing:
sudo a2enmod rewrite
After you have made these changes, restart Apache:
sudo service apache2 restart
Permalink Problem
Inside of this file, we want to change all things.
sudo nano /etc/apache2/sites-available/000-default.conf
000-default.conf - should look something like this:
<VirtualHost *:80>
ServerAdmin webmaster@localhost
DocumentRoot /var/www/html
<Directory /var/www/html/>
Options Indexes FollowSymLinks
AllowOverride All
Require all granted
</Directory>
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>
When you are finished, save and close the file.
Next, we need to enable the rewrite module, which allows you to modify URLs. You can do this by typing:
sudo a2enmod rewrite
After you have made these changes, restart Apache:
sudo service apache2 restart
Permalink Problem
Inside of this file, we want to change all things.
sudo nano /etc/apache2/sites-available/000-default.conf
000-default.conf - should look something like this:
<VirtualHost *:80>
ServerAdmin webmaster@localhost
DocumentRoot /var/www/html
<Directory /var/www/html/>
Options Indexes FollowSymLinks
AllowOverride All
Require all granted
</Directory>
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>
When you are finished, save and close the file.
Next, we need to enable the rewrite module, which allows you to modify URLs. You can do this by typing:
sudo a2enmod rewrite
After you have made these changes, restart Apache:
sudo service apache2 restart
Permalink Problem
Inside of this file, we want to change all things.
sudo nano /etc/apache2/sites-available/000-default.conf
000-default.conf - should look something like this:
<VirtualHost *:80>
ServerAdmin webmaster@localhost
DocumentRoot /var/www/html
<Directory /var/www/html/>
Options Indexes FollowSymLinks
AllowOverride All
Require all granted
</Directory>
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>
When you are finished, save and close the file.
Next, we need to enable the rewrite module, which allows you to modify URLs. You can do this by typing:
sudo a2enmod rewrite
After you have made these changes, restart Apache:
sudo service apache2 restart
If you’ve followed the initial steps and you’ve not been able to get rewrite to work for you, do the following ::: <br> <br>Firstly it’s important you restart the apache2 server without any errors, ( Restarting web server apache2 : error … ) ::: If you do get this error do the folllowing ::: <br> <br>1) sudo nano /etc/apache2/httpd.conf <br>2) Add, ServerName localhost <br> <br> <br>Open up the following file, and replace every occurrence of “AllowOverride None” with “AllowOverride all” <br> <br>1) sudo nano /etc/apache2/sites-available/default <br>2) sudo service apache2 restart
Im having an odd issue with this, that on google I find was relevant, and the fixes work, from wordpress 2.5 (im on 4.3)
Permalinks work, if I make the structure “/index.php/%postname%” Anything else… doesnt work. Any ideas ??? :)
Hi -
I’m having trouble getting permalinks to work on my wordpress site. These are my droplet details: 512MB Ram, 20GB SSD Disk, Ubuntu 14.04 x64.
I’m following the steps listed here: https://randomwordpresstips.wordpress.com/2013/05/10/enabling-permalinks-on-wordpress-install-ubuntu-12-10/
These are the steps I followed (restated, more or less):
Enabled mod_rewrite using this command: sudo a2enmod rewrite
Restarted the apache server using this command: service apache2 restart”
Updated the .htaccess file in my Wordpress site’s web directory (in my case: /var/www/html) to the following:
RewriteEngine On RewriteBase / RewriteRule ^index.php$ – [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /index.php [L]
This is where I get stuck. The instructions go on to say:
"Open up the following file, and replace every occurrence of “AllowOverride None” with “AllowOverride all” (note : “all” should be in lower-case for this to work)
I found my way to this location: /etc/apache2/sites-available. In that folder I see two files: 000-default.conf default-ssl.conf
I checked out both of those files but I don’t see “AllowOverride” anywhere.
When I try changing the setting on the site I still have the same 404 problem.
Thanks @laudes.michael the solution helped
Anyone find a solution to this?
I just followed all the instructions and when I pull up my Wordpress site that is now on the DO droplet, I get the main page and even can go to Dashboard, but many of my pages and links are PAGE NOT FOUND!
I’ve tried the Permalinks resetting tips of saving the format again, but that doesn’t help.
I’ve even made sure my .htaccess file still have the following:
BEGIN WordPress
RewriteEngine On RewriteBase / RewriteRule ^index.php$ - [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /index.php [L]
END WordPress
No change.
What am I missing?
I am having problems. When I open the /etc/apache2/sites-available/default file in the console - it is a blank screen? this is a brand new droplet