Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

WordPress site migration - icons missing

I have recently migrated my local site to a staging server by following the steps at https://codex.wordpress.org/Moving_WordPress and everything seemed to have worked correctly.

Initially the database of each was pointing to the incorrect url's (wp_options siteurl and home fields) and needed switching, but having done this nearly everything has moved correctly - except for the icons.

The theme being used pulls it's icons from a number of different sites (font-awesome, ionicons etc.) but none of them are showing. Having looked in the tags of each site I can see that they are pointing to the incorrect url (dev site to staging and vice versa).

Does anyone know where I would need to go to amend this? I have searched the database and cannot find from where this is being pulled.

Any help here would be greatly appreciated.

like image 668
rushtoni88 Avatar asked Jun 20 '26 07:06

rushtoni88


2 Answers

you can either use a plugin for instance like this [https://wordpress.org/plugins/better-font-awesome/] .Just install the plugin and activate and all the icons will be added automatically.

Or alternatively you can do it manually of which I believe was the approach you used initially. All you have to do is add this single line of code in your theme’s header.php file just before the tag.

<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.4.0/css/font-awesome.min.css" />

Though you can also load stylesheets or scripts in WordPress to properly enqueue them. For instance, instead of linking to the stylesheet from your theme’s header template, you can add the following code in your theme’s functions.php file.

function wpb_load_fa() {

wp_enqueue_style( 'wpb-fa', 'https://maxcdn.bootstrapcdn.com/font-awesome/4.4.0/css/font-awesome.min.css' );

}

add_action( 'wp_enqueue_scripts', 'wpb_load_fa' );

So in short, you can either check for the code on the header.php just before the or functions.php under en-queued scripts.

Hope this helps Hellen. Thank you

like image 146
Dickens Otieno Avatar answered Jun 21 '26 22:06

Dickens Otieno


I managed to solve this in the end.

  1. Go into the admin panel into Settings > General
  2. Change the WordPress Address (URL) and Site Address (URL) to a different address (in this case I just added 'www.' to the current URL) and save the changes.
  3. This redirected me and I had to sign in again with the username and password.
  4. I then went back into the same area and returned it to it's original URL and saved the changes.

I believe this may have been an issue with the visual composer plugin needing to recompile the URLs. Either way, this resolved the issue.

Thanks for your suggestions :)

like image 42
rushtoni88 Avatar answered Jun 21 '26 21:06

rushtoni88



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!