WordPress knowledge sharing

The process of changing the default 404 and 502 pages of the pagoda panel to WordPress template pages

Pagoda panel page 404 Display: 404 Not Found, which is the error prompt page of Nginx. The built-in 404 template of WordPress theme is not displayed. Our goal is to replace the 404 and 502 pages with the more attractive ones built into WordPress. In fact, the solution is very simple, and Weieis Blog is shared for everyone to use.

Lao Wei suggested that the pagoda panel is suitable for novices and Xiaobai to build a website, and supports Linux and Windows systems, Click to go directly to the pagoda website Register an account and get a free professional edition gift package of ¥ 3188 (only 1188 yuan for permanent authorization of the professional edition). New users can enjoy a professional edition experience of 0.99 yuan for 7 days.
Recommended selection of pagoda panel Alibaba Cloud Tencent Cloud The server
For more information, see Special topic of pagoda panel
Click to view NetEase Cloud Classroom "Introduction to Pagoda Linux Panel for Novice"

Modifying this page has three advantages. One is to improve security. For example, the screenshot above is a classic 404 page of pagoda panel. Once you know the panel to use, it will be easy to find a targeted vulnerability intrusion. Second, it is good for website SEO optimization. The original 404 page does not have any website links, so users can only quit and reopen the website, which will lose many valuable visitors. The third is to improve the beauty of the whole website. The error page built into the WordPress template is more beautiful, which is easy to retain visitors.

The modification method is as follows: find the website>>settings>>configuration file in the pagoda panel, and see the two lines in the red box in the figure below. What you see is that after Lao Wei added #, the default is no #. After adding, it will look like a screenshot. Save it.

#It is the meaning of comments in PHP, that is, these two lines will not be executed after being commented. Then the foreground automatically switches to the error page provided with WordPress.

If you refresh the 404 page, it will be replaced with a beautiful page that comes with the template. As follows, Lao Wei did not capture the whole picture. In fact, there are some pictures and articles attached to the template at the bottom. The whole page looks very beautiful, which not only improves security but also solves the problem of lost access in SEO optimization, killing three birds with one stone.

I hope that all users who use the pagoda panel can refer to the modified content in this article and perform this simple operation, which will bring many benefits. The website will be more perfect and safe only if it pays attention to these details.

Like( five )
Article name: The process of changing the default 404 and 502 pages of the pagoda panel to WordPress template pages
Article link: https://www.vpsss.net/16053.html
Copyright notice: The resources of this website are only for personal learning and exchange, and are not allowed to be reproduced and used for commercial purposes, otherwise, legal issues will be borne by yourself.
The copyright of the pictures belongs to their respective creators, and the picture watermark is for the purpose of preventing unscrupulous people from stealing the fruits of labor.