Enable WordPress pretty permalinks

Scenario: You have a VPS, you have installed Apache, MySQL, PHP and WOrdpress, and you want to enable pretty permalinks.
If you’re getting a 404 error when accessing your WordPress posts after having enabled pretty permalinks in the settings, then this is how to solve the issue (at least it worked for me).

Log in into your VPS server.

then let’s get to the sites-enabled folder

cd /etc/apache2/sites-enabled

Here there is a file called 000-default

using something like nano (a simple text editor) open this file

Use sudo if you’re not logged in as root.

Now that the file is open, you’ll see something like this:

What we need to do is to change those two "AllowOverride None" to "AllowOverride All".
Like so:

Once it’s done, just restart your apache server

And your pretty permalinks should be working now! Nice!

 

Leave a Reply

Your email address will not be published. Required fields are marked *