Through the WordPress background preferences to change the site URL address, the site will appear to be unable to access the situation, generally speaking, the site is not landing on the back, I found from the Internet four methods, the four methods of the first three are required to log in to the backstage, but in fact, after the error, can not login backstage, Unable to log in backstage to adjust! So I used the fourth method, by modifying the contents of the database content modification success!
The first kind, modify the wp-config.php
1, in wp-config.php, add the following two lines of content:
Define (' Wp_home ', ' http://www.yourdomain.com ');
Define (' Wp_siteurl ', ' http://www.yourdomain.com ');
Www.yourdomain.com represents your new address.
2. Login background, reconfigure the new blog address (HOME) and installation address (SiteURL) in "General Settings", and remember to delete the above additions after success. (after testing, these two items can not be modified at this time, later to be modified only in the wp-config.php modified, it is not recommended.) )
The second kind, modifies the functions.php
Functions.php refers to the topic in the current blog theme directory, you can customize some of the theme functions.
1, in functions.php, add the following two lines of content:
Update_option (' SiteURL ', ' http://www.yourdomain.com ');
Update_option (' Home ', ' http://www.yourdomain.com ');
Again, www.yourdomain.com represents your new address.
2. Login background, reconfigure the new blog address (HOME) and installation address (SiteURL) in "General Settings", and remember to delete the above additions after success. (This method is available)
Third, modify wp-config.php (automatically update address)
1. In wp-config.php, add the following line:
Define (' relocate ', true);
2, login to the back office address, WP will automatically update the installation address (SiteURL), manually modify the blog address (HOME) address can, after success must remember to delete the above added content. (This method modified after the site still does not have normal access, but also can not modify the address, PASS)
Fourth, modify the database
1. Log in to your admin page to find the Wp_options table
2. Modify the SiteURL and Home fields in the table to the current new domain name
The specific SQL is: UPDATE wp_options SET option_value=replace (option_value, ' http://Bad URL ', ' http://correct URL ') WHERE option_name= ' Home ' or option_name= ' siteurl '; if not, you can execute a commit; Note the character format in SQL and the semicolon after the statement. (not tested)
This problem is fixed, the second method, the perfect solution to the WordPress set up the wrong domain name after the access problem.
Troubleshooting wordpress Settings Error URL site cannot access the issue