How-To Pretty Permalinks

Pretty permalinks allow the links on your posts to appear like this:, instead of, where N is some id number. Ugly permalinks are used by default, so if you decide to switch over, you need to follow the instructions here.

But it isn’t a straightforward process. I’m using an Apache Server, so if you’re running Apache too, you can follow these steps:

  1. Log in to your server and vi to your httpd.conf file.
  2. Go to <Directory "/var/www/"> section, or create one new section for it if it doesn’t exist. The directory should be where your WordPress pages are stored. If you didn’t configure it this way, the directory is usually the default /var/www/html.
  3. The codes should look like this:
    <Directory "/var/www/">
    # Enable FollowSymLinks here
    Options Indexes FollowSymLinks

    # Allow override
    AllowOverride All

    Require all granted

  4. Also make sure that your .htaccess file can be written by WordPress. If you don’t already have one, WordPress will create one for you, and you may find it in your WordPress directory.
  5. Restart Apache: apachectl restart.
  6. Now go to your WordPress Dashboard and go to Settings > Permalinks. Select the option that gives you a pretty permalink, i.e. Post Name, and you’re done!

Leave a Reply

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