Why does wordpress appear 404
Often wordpress users have a 404 when the page opens. In this case There are two main reasons: the problem of pseudo-static settings; the server does not support Chinese links. For pseudo-static problems, you can go to WordPress background settings - fixed links to set up. If it still doesn't work, you can contact the server administrator.
WordPress Chinese links will also encounter 404 on some servers, most of which are servers with Windows systems (so we strongly do not recommend using Windows servers, as there are many pitfalls).
To solve this problem, we recommend that you do not choose the article name when setting the fixed link. You can choose to use ID, and manually change the alias for pages, categories, and tags to English letters and numbers, etc.
The more troublesome thing is the tags. Since the number of tags will be relatively large and will increase from time to time, manual modification will be more troublesome. Here are several plug-ins recommended to solve this problem: Auto Tag Slug, IIS Chinese Tag Permalink.
The above is the way to use plug-ins, but since these two plug-ins have not been updated for many years, here is another way to modify the code (modified code will be overwritten by the new version, please check every Pay attention to this issue in the next update). Enter the wp-includes directory, find the class-wp.php file, and find the following code on lines 178 and 182:
##Change line 178 to:$pathinfo = isset( $_SERVER['PATH_INFO'] ) ? mb_convert_encoding($_SERVER['PATH_INFO'],'utf-8', 'GBK') : '';
list( $req_uri ) = explode( '?', mb_convert_encoding($_SERVER['REQUEST_URI'], 'utf-8','GBK') );
WordPress Tutorial column!
The above is the detailed content of Why does wordpress appear 404. For more information, please follow other related articles on the PHP Chinese website!