Moving a primary domain to another host as secondary cause errors in some image URL October 18, 2022 by Tarik Billa This finally did the trick for me: RewriteRule ^files/(.*)$ http://domain_name/wp-content/uploads/$1 [L,R=301]