WordPress knowledge sharing

Inappropriate setting of cdn parameters causes WordPress background unable to enter

A WordPress background cannot be accessed. The webmaster tried all kinds of methods, but did nothing. What should be done or should not be done was done again. The WordPress background entered the account password and then jumped to it. The URL in the address bar is still: your domain name/wp admin. Lao Wei shared the solution as follows.

1. Try to solve the problem

First, I tried to restart PHP, restart nginx, restart MySQL, change the database password, and even restore the database backup and website backup. Some operations unrelated to being unable to access the WordPress background were also done. At this time, the webmaster was a little worried, and the business could not stop.

2. Analyze problems

Old Wei suggested: Think about the normal backstage of the website in the morning, and you can't get in at noon. What have you done this morning?

So the webmaster listed all the operations he had done on the website in the morning, including publishing articles, setting plug-ins, setting CDN parameters, etc.

On the WordPress login page, press F12 to call out the developer debugging tool. After pressing F5 to refresh the current login page, we see that the wp admin status is 301, 302, 404, indicating that it is blocked.

 Inappropriate setting of cdn parameters results in inability to access WordPress background

At this time, Lao Wei guessed that the problem might be caused by some changes to the cdn parameters.

3. Problem solving

When Lao Wei opened the cdn console and entered Domain Name Management>Back to Source Configuration, he saw that "Back to Source Follow 301/302 Configuration" was related to 301 and 302. After asking the webmaster, he learned that this function was accidentally enabled in the morning.

 On the cdn console, enter Domain Name Management>Back to Source Configuration, and see "Back to Source Follow 301/302 Configuration"

Then it is judged that this may be the reason why you cannot access the WordPress background. Turn off this function and wait for five minutes. After the cdn configuration parameters are distributed to each node, it will be normal to access the WordPress background again.

4. Why does this error occur?

The function of this function is to enable the configuration of 301/302 to follow back to the source. When the CDN node encounters 301/302 during back to the source, it will actively go back to the source server to obtain the required resources (follow for up to three times), and then return the actual resources to the client. The client does not need to jump.

It can be said that the purpose of "follow 301/302 back to the source" is to improve the user experience and improve the user access speed (without jump action).

The key to the problem is "jump 3 times at most". from The cdn document is found to follow 301/302 The explanation of is as follows:

After enabling the 301/302 configuration of back to source follow, it can only follow three jumps at most. If it exceeds the limit, it will directly return to 301/302 to the customer.

It happened that the user hid the background login address of WordPress, so there were multiple jumps and 301, 302, 404 in the above developer mode.

Selected explosives area
618 Zhongshenghui Click to view the purchase
Selected preferential activities Click to view the purchase
Tencent Cloud Preferential Products Zone Click to view the purchase
Cross border e-commerce store server Lightweight application server
Tencent Cloud Animal Palu Game Server Click to view the purchase
For more Tencent Cloud content, please see Tencent Cloud

5. Summary

There are many reasons for not being able to enter the WordPress backstage, including what Lao Wei shared Resolve WordPress background unable to log in Plugin problem, unable to log in to wordpress background The WordPress background cannot be accessed because the CDN starts the intermediate source Some problems are related to cdn and some are related to plug-ins. The key step is to quickly find out the problem through the developer's debugging tools. Blind and disorderly operation cannot find the root cause of the problem, let alone solve it.

Like( zero )
Article name: Inappropriate cdn parameter settings cause WordPress background access
Article link: https://www.vpsss.net/25493.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.