Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Access automatically jumps to the old port after Wordpress changes the port

2025-01-21 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/02 Report--

Access automatically jumps to the old port after Wordpress changes the port? This problem may be often seen in our daily study or work. I hope you can gain a lot from this question. The following is the reference content that the editor brings to you, let's take a look at it!

When you first installed the wordpress program, nginx was configured with port 8081.

After starting the nginx and php services, visit http://www.example.com:8081/wp-admin to start the step-by-step installation, and then successfully build the blog site.

After the website has been running for a period of time, you need to change port 8081 to port 80. After changing port 8081 in nginx configuration to port 80, and reloading the nginx configuration file, visiting the website will automatically jump to port 8081 (the old port configured last time), clear the browser cache and restart nginx, which still cannot solve this problem.

The cause of the problem:

When wordpress is installed for the first time, the home address of the website will be saved to the wordpress database. Later, when you visit the website, the home address in the database shall prevail. If you change the access address (ip, domain name, port change) mapped by web servers such as nginx, you will still automatically jump to the home address stored in the database.

Solution:

Modify 2 records of wordpress database, wp_options table, option_name field equal to siteurl and home

After the change is successful, the wordpress website can be accessed normally through port 80.

MySQL operation statement:

# wp_ options table query record select * from wp_options where option_name in ('siteurl','home'); # wp_ options table updates the value of option_value update wp_options set option_value=' http://www.example.com:80' where option_name in (' siteurl','home'); thank you for reading! I hope the content of the article will be helpful to all of you. If you want to know more about the relevant articles, you are welcome to follow the industry information channel.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report