How to display images in wordpress after changing a new domain
December 28, 2019
“WordPress Address (URL)” and “Site Address (URL)” in the WordPress website management background settings automatically fill in the default URL of the corresponding website.
Sometimes, the webmaster may encounter the situation of changing the domain name, but when using the new domain name to access, the previously uploaded pictures cannot be displayed.
In fact, don’t worry, here is a simple method, after correcting the picture address to the corresponding address of the new domain name, it can be displayed.
1. Change “WordPress Address (URL)” and “Site Address (URL)”
You can use phpmyadmin to connect to the website database and update the wp_options table with fields: option_name values: siteurl and home, and the corresponding option_value values are the new domain name.
Only after completing this step can you successfully enter the background, otherwise even if you enter the password, it will automatically jump to the original old domain name.
Of course, you can also use a SQL execution statement to complete the above two domain name change settings. Open the data table wp-options, switch to the SQL state, and enter the following code in the input field to execute: