Pretty permalinks allow the links on your posts to appear like this: http://your-domain.com/post-name/
, instead of http://your-domain.com/?p=N
, 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:
- Log in to your server and
vi
to yourhttpd.conf
file. - Go to
<Directory "/var/www/your-domain.com/public_html">
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
. - The codes should look like this:
<Directory "/var/www/your-domain.com/public_html">
# Enable FollowSymLinks here
Options Indexes FollowSymLinks# Allow override
AllowOverride AllRequire all granted
</Directory> - 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. - Restart
Apache
:apachectl restart
. - 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!