This tutorial is packaged and replaced for my entire site,But it can also be used to change the domain name path when you move.
such as Original domain name a.com Replace in bulk b.com
Whole station packing
download
2GB
Start of the tutorial
Entry path: themes/theme/functions.php
Add the following code
function replace_text_wps($text){
$replace = array(
‘https://Old domain name’ => ‘https://New domain name’,
);
$text = str_replace(array_keys($replace), $replace, $text);
return $text;
}
add_filter(‘the_content’, ‘replace_text_wps’);
add_filter(‘the_excerpt’, ‘replace_text_wps’);
Can
end