Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Change Wordpress Image URL

On my wordpress site all my images are showing up as broken links. They are also showing up as broken links in the media gallery in the wordpress backend.

I inspected the images using Google chrome and saw that they all show up like this:

<img src="http://firouzeh.co.uk/frouzeh/frouzeh/wp-content/uploads/sites/3/2013/04/Granulated-Persepolis-Ring-230x160.jpg">

there is a duplication of a file name in the path and to get the images to work I need the path to look like this:

<img src="http://firouzeh.co.uk/frouzeh/wp-content/uploads/sites/3/2013/04/Granulated-Persepolis-Ring-230x160.jpg">

I have searched through the database and cannot find where to change the path to my images, specifically I think there must be a field somewhere that is directing everything to www.firouzeh.co.uk/frouzeh where it should just be sending it to www.firouzeh.co.uk.

Does anyone know where to change the path?

like image 337
contool Avatar asked Aug 02 '13 17:08

contool


1 Answers

If your URL settings are correct under Settings > General, then you could try using a Search and Replace plugin to update every occurrence in your database.

http://wordpress.org/plugins/search-and-replace/

Search for firouzeh.co.uk/frouzeh/frouzeh Replace it with firouzeh.co.uk/frouzeh

Back up your site first :)

If you did just move your site from another location, I suggest using the Duplicator plugin, which handles all of the replacing.

http://wordpress.org/plugins/duplicator/

like image 193
Kenny Avatar answered Oct 12 '22 04:10

Kenny