The following column WordPress Tips will introduce to you the solution to the problem of being unable to log in to the website after setting the WordPress backend site address. I hope it will be helpful to friends in need!
Cannot log in to the website after modifying the backend site addressWordPress
Newly contactedWordPress Novices may think that they can change the domain name by directly changing the address in the background general settings page, WordPress address (URL) and site address (URL). This is an absolutely wrong approach. The result was terrible. After the modification, the website could not load style files, nor could I log in to the backend. I didn’t know where to start if I wanted to change it back.
You cannot log in to the website after modifying the WordPress backend site address
The more common method is to log in to phpMyAdmin and modify the link addresses of home and siteurl in the wp-options table of the database.
Here is a simpler method, add the following code to the current theme function template functions.php:
update_option('siteurl','https://zmingcx.com'); update_option('home','https://zmingcx.com');
Change the link in the code to your own, and then refresh the page , the correct link will be restored.
The above is the detailed content of How to solve the problem of being unable to log in to the website after changing the WordPress backend site address. For more information, please follow other related articles on the PHP Chinese website!