Mimma
Mimma

Reputation: 113

Images not showing error after WordPress migration from localhost to live server

I uploaded my website to my server.

But when I call the website, it shows the url "localhost:8888", and gives me an error:

the website link is: www.smarts-co.com

in wp_options table, I did changed the home & siteurl values in MySQL to my site URL, but still getting the error that you get when you click on my website.

enter image description here

Upvotes: 0

Views: 5361

Answers (3)

Shyam Gupta
Shyam Gupta

Reputation: 1

When you move the wordpress website from XAMPP localhost to webhosting server the image links usually change from /wp-content to https://wp-content So follow this step:

  1. Install "Better Search Replace" plugin.
  2. Search and replace the below text in database Search for "https://wp-content/" and replace it with "/wp-content/"

Hope this solves your problem.

Upvotes: 0

Hamza Ahmad
Hamza Ahmad

Reputation: 545

In your wp-config.php, try adding this code above // ** MySQL settings - You can get this info from your web host ** //

define('WP_HOME','http://www.smarts-co.com');
define('WP_SITEURL','http://www.smarts-co.com');

BTW, your website seems to be loading; your logo picture needs to be fixed though.

Upvotes: 0

WPDev
WPDev

Reputation: 161

Mainly you need to properly move WordPress to Live Server.

Try to right click on your site's logo and open image in new tap: You will get the following link:

http://localhost:8888/smartService/wp-content/uploads/2018/04/logo-website-1.png

This means you didn't migrate the site properly.

the short answer is you need to fix the URLs in your site as per images issues and some more work if any additional bug.

The above link should look like:

http://smarts-co.com/wp-content/uploads/2018/04/logo-website-1.png

I would do the following to migrate site from localhost to live server:

Method 1:

Use some plugins to migrate WordPress site, pickup your favorite from Plugins directory.

Method 2:

Its manual but I like it and mostly never fail; you need to know what you are doing though if you tried this method.

  1. Upload files to server.
  2. Using Notepad++, find and replace all http://localhost/ to http://www.example.com/
  3. You need offcourse to fix wp-config.php

Method 3:

You can try some find/replace plugin to search MySQL and fix the issue. I believe you may want to try method 3 as you already uploaded to server from local host.

Also please google: (how to upload wordpress website from localhost to cpanel)

Note: this answer is realated to fixing images not showing after uploading to live server and not a complete manual for migration.

Upvotes: 1

Related Questions