For wordpress experts

1

I have a small problem. When I migrated a web from my local server to the remote one, I missed an error and it is still loading the old local address, even though I have already replaced all the links in the database through the well-known code of .. .. wp_posts set post_content = replace ... and the local domain is still appearing. Although the page works, the information is loaded without problems, but the styles and javascript files follow the old local domain.

What is it that I have not changed? I have made other migrations before and this never happened to me.

    
asked by ALENN'K 22.02.2018 в 16:46
source

2 answers

0

In the options table (if you use the default prefix is wp_options) change the siteurl and home options for the new domain of your site.

    
answered by 22.02.2018 / 17:39
source
0

I think you're missing the WHERE clause in the first sentence and you have some ; left:

update wp_posts set 
post_content = replace(post_content,'localhost/kbmtrading/', 'kbmtrading.com') 
WHERE option_name = 'home' OR option_name = 'siteurl';

update wp_posts set 
guid = replace(guid, 'localhost/kbmtrading/', 'kbmtrading.com');

update wp_options set
option_value = replace(option_value, 'localhost/kbmtrading/', 'kbmtrading.com'); 

update wp_postmeta set 
meta_value = replace(meta_value, 'localhost/kbmtrading/', 'kbmtrading.com');
    
answered by 22.02.2018 в 17:44