WordPress optimization: Change pinned links for sites and redirect old links to new links

Source: Internet
Author: User
Tags wordpress optimization

To change the fixed link of the article, you can directly in the background of the site "settings" –> "fixed link" inside to set

Some parameters of wordpress fixed link settings:
%year%: Based on the year the article was published, such as 2016


%monthnum%: Based on the month that the article was published, such as 03


%day%: Based on the day the article was published, for example 23


%hour%: Based on article publishing hours, such as 10


%minute%: Based on article release minutes, such as 10


%second%: Based on post number of seconds, such as 33


%postname%: article-based postname, whose value is the abbreviated name specified at the time of writing, and the title of the article without specifying a thumbnail name


%post_id%: Based on article post_id, such as 48


%category%: Based on article classification, sub-classification will be processed into "classification/sub-classification" of this form


%author%: Based on the author name of the article


By combining the above parameters, you can get the fixed link form of WordPress


Several common ways to set up online:
/%year%/%monthnum%/%day%/%postname%/

/%year%/%monthnum%/%postname%/

/%year%/%monthnum%/%day%/%postname%.html

/%year%/%monthnum%/%postname%.html

/%category%/%postname%.html

/%post_id%.html


For example, my blog the previous fixed-link format is:/%year%/%monthnum%/%postname%/ , now changed to:/%post_id%.html if changed after the visit to the article 404, You can check whether the host under the Web site supports pseudo-static, which is the site root directory under the Apache environment . htaccess file

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M00/7E/52/wKiom1b77nCxk5O_AACO8bRP2NI229.png "title=" 20160323095850_18826.png "alt=" Wkiom1b77ncxk5o_aaco8brp2ni229.png "/>

If it's a new station, it's OK to finish the above steps. But if a already in the major search engines have included, or have a lot of outside the chain, it is obvious that after changing the fixed link, the previous kind of link format has been unable to access the normal, will explode 404 error. If we do not want to lower the rights on Baidu, or want to let the previous old link form can also be accessed, then we need to 301 redirect the old link.


Because my PHP code is not very good, so I found a plugin to complete the task, it is:WP permalinks Migration

Because I have not been able to search in the plugin center, so i downloaded an online version, fortunately, my current WordPress4.4 can also be used, download link: http://pan.baidu.com/s/1i3RPJm9


On the use of this plugin instructions, you can use the plugin to upload the way to install after the plugin can be seen. In simple terms:

(1) Start the plugin and fill in the old fixed link format in this plugin's setup options

(2) Change the fixed link format of the website in the settings


This article is from "Zifangsky's personal blog" blog, make sure to keep this source http://983836259.blog.51cto.com/7311475/1758637

WordPress optimization: Change pinned links for sites and redirect old links to new links

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.