Question:

How to create permalinks in Wordpress?

by Guest3269  |  12 years, 8 month(s) ago

0 LIKES UnLike

I have moved my blog from wordpress.com to self hosted Wordpress and have problem creating permalinks. It is showing myblog.com/?p=123 while I want it to be like myblog.com/blog-post-title. Please tell me how to create such permalinks? Do you have any knowledge about this? can someone help me with this?

 Tags: create, permalinks, Wordpress

   Report

1 ANSWERS

  1. Guest2966

    A permalink is a permanent link to an article or blog entry. It is what you get when a user clicks on the titles of one of your wordpress entries, so if they want to give the link to someone else, the url will always be the same. By default wordpress will make the permalink to the article the articles ID, so it would look like example.com/?p=123, which isn’t very descriptive. Instead if you log into your admin panel and select settings and then permalinks you can change the format of your links to something a little more human readable, and much more search friendly such as /2011/how-to-create-enable-pretty-permalinks-in-wordpress-when-hosting-with-nginx/ which tells you not only the date it was published but the title too.

    You may find after you’ve changed your permalinks that your articles now all get a 404 error. This is because your server thinks that you’re looking for a file in the /2010/01/29/national-instruments-extreme-video/ directory. So we need to let our server know not to do that. There are plenty of examples of how to do the re-write if you’re using apache, but if you’re an nginx fanboy like I am, there wasn’t very much information. So to make this happen we need to add a few extra lines under our nginx.conf under the location / { section like this:

    location / {

    if (!-e $request_filename) {

    rewrite ^.*$ /index.php last;

    }

    }

    Hope this will help.

     

Sign In or Sign Up now to answser this question!

Question Stats

Latest activity: 12 years, 11 month(s) ago.
This question has 1 answers.

BECOME A GUIDE

Share your knowledge and help people by answering questions.