cancel
Showing results for 
Search instead for 
Did you mean: 

How to change localhost image urls accross multiple images

How to change localhost image urls accross multiple images

This is my first time asking a question so here goes. I have recently moved my Localhost magento 2 site to a live server. Everything works great but i have a problem and was hoping to find a solution. I have many products and I have added Images in Magento Product Content Description, problem is all the image urls are http://localhost/example/pub/media/wysiwyg...Is there a way to change all of them to my live site eg https://example.com/pub/media/wysiwg...without having to go through each one individually?

So change the localhost urls http://localhost/example/pub/media/wysiwyg...to live server urls https://example.com/pub/media/wysiwyg....etc?

3 REPLIES 3

Re: How to change localhost image urls accross multiple images

@adrian_stewart 

You need to change the URL manually

OR
Replace the URL in the database by finding product description attribute_id by catalog_product_entity_text.
Problem solved? Click Kudos and "Accept as Solution".
200+ Magento 2 Extensions for Enhanced Shopping Experience.

Re: How to change localhost image urls accross multiple images

Hi @adrian_stewart,

 

Access your database then navigate to the core_config_data table. In this, you need to change the entire URL of the website to your live site. This will fix your problem!

 

Hope this can help you! Let me know if you need further assistance.

_________

If issue solved, Click Kudos & Accept as Solution.

LitExtension - #1 Shopping Cart Migration Expert

LitExtension helps store owners and agencies migrate all important data from one eCommerce platform to another accurately, securely and at the highest speed.

Visit website: http://litextension.com/

Re: How to change localhost image urls accross multiple images

Go to Stores->Configuration->general->web 

change the media url  https://example.com/pub/media  for both secure and unsecure .

Now run the following commands:-
1.  php bin/magento se:up
2.  php bin/magento se:di:com
3.  php bin/magento s:s:d -f

Problem solved? Click Kudos and "Accept as Solution".