Divi is a great tool for creating and building websites, but one thing that constantly annoys me is when I transfer websites to a new server, updating the database always seems to leave two image files stuck with the old URL – the Logo and the Favicon . This can be either transferring to a new domain name, or updating the URL to an https configuration.

Favicon Logo error

I’d been using the WP Beaches database update SQL code and it is great for general WordPress database updates, but it doesn’t fit perfectly for Divi theme users. Here’s the code below:

UPDATE wp_options SET option_value = replace(option_value, 'http://www.oldurl', 'http://www.newurl') WHERE option_name = 'home' OR option_name = 'siteurl'; 
UPDATE wp_posts SET guid = replace(guid, 'http://www.oldurl','http://www.newurl'); 
UPDATE wp_posts SET post_content = replace(post_content, 'http://www.oldurl', 'http://www.newurl'); 
UPDATE wp_postmeta SET meta_value = replace(meta_value,'http://www.oldurl','http://www.newurl');

Divi Upgrade

The problem lies with the first line. It basically says that you should only look for two option names in the wp_options set. The Divi logo and favicons that you upload in their theme editor are housed in different option_names, which you need to include in order to allow all of the images to be updated. They are:

nice_options, nice_logo and nice_favicon

So the final version of this update code should be:

UPDATE wp_options SET option_value = replace(option_value, 'http://www.oldurl', 'http://www.newurl') WHERE option_name = 'home' OR option_name = 'siteurl' OR option_name = 'nice_options' OR option_name = 'nice_logo' OR option_name = 'nice_favicon'; 
UPDATE wp_posts SET guid = replace(guid, 'http://www.oldurl','http://www.newurl'); 
UPDATE wp_posts SET post_content = replace(post_content, 'http://www.oldurl', 'http://www.newurl'); 
UPDATE wp_postmeta SET meta_value = replace(meta_value,'http://www.oldurl','http://www.newurl');

Hopefully that’ll help get your URLs updated without having to login and re-save the logo on Divi Theme Options