I've uploaded a wordpress site but it's missing javascript and css. The links on the head still have the local path (src='https://localhost...'
) and not the new ones. So I guess it has to do with get_template_direcory_uri() that I use in fucntions.php to apply my javascript/jquery,bootstrap,css etc.
How yo fix that?
I've tried adding to config.php:
define( 'WP_SITEURL', 'http://' . $_SERVER['HTTP_HOST'] );
define( 'WP_HOME', 'http://' . $_SERVER['HTTP_HOST'] );
and
define( 'WP_HOME', 'https://...' );
define( 'WP_SITEURL', 'https://...' );
but they didn't help...
I've uploaded a wordpress site but it's missing javascript and css. The links on the head still have the local path (src='https://localhost...'
) and not the new ones. So I guess it has to do with get_template_direcory_uri() that I use in fucntions.php to apply my javascript/jquery,bootstrap,css etc.
How yo fix that?
I've tried adding to config.php:
define( 'WP_SITEURL', 'http://' . $_SERVER['HTTP_HOST'] );
define( 'WP_HOME', 'http://' . $_SERVER['HTTP_HOST'] );
and
define( 'WP_HOME', 'https://...' );
define( 'WP_SITEURL', 'https://...' );
but they didn't help...
Share Improve this question edited Oct 28, 2019 at 12:59 kero 6,3401 gold badge25 silver badges34 bronze badges asked Oct 28, 2019 at 12:33 Emmanuel RichmanEmmanuel Richman 134 bronze badges 4 |1 Answer
Reset to default 1Do your URL change up in phpMyAdmin with SQL language:
# Change website url
UPDATE wp_options
SET option_value = replace(option_value, 'http://www.old-site','http://www.new-site') WHERE option_name = 'home' OR option_name = 'siteurl';
# Change GUID URL
UPDATE wp_posts SET guid = REPLACE (guid, 'http://www.old-site','http://www.new-site');
# Change url of medias, post, page, etc.
UPDATE wp_posts SET post_content = REPLACE (post_content, 'http://www.old-site','http://www.new-site');
# Change meta data url
UPDATE wp_postmeta SET meta_value = REPLACE (meta_value, 'http://www.old-site','http://www.new-site');
enqueue
code – Arsalan Mithani Commented Oct 28, 2019 at 13:11