Change Wordpress Image URL

On my Wordpress site, all my images appear as broken links. They also appear as broken links in the media gallery in the wordpress backend.

I looked through the images using Google chrome and saw that they all look like this:

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

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

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

I searched in the database and cannot find where to change the path to my images, in particular, I think that there should be a field where everything is directed to www.firouzeh.co.uk/frouzeh, where he should just send it to www.firouzeh.co.uk.

Does anyone know where to change the path?

+6
source share
3 answers

If your URL settings are correct under Settings> General, you can try using the Search & 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

First back up your site :)

If you just moved your site from another place, I suggest using the Duplicator plugin, which handles the entire replacement.

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

+4
source

Use the same solution that I wrote for here: https://stackoverflow.com/a/18023214/1946078

It looks like this:

When moving the Wordpress installation, you also need to edit two fields in the database. Run this for your database to find the values ​​you need to edit:

 SELECT * FROM `wp_options` WHERE option_name IN('siteurl', 'home'); 

If access to the database is not a parameter, another way to do this is to edit the wp-config.php file to include the following two lines:

 define('WP_HOME','http://yoursite.com'); define('WP_SITEURL','http://yoursite.com'); 

Straight from http://codex.wordpress.org/Changing_The_Site_URL

  • The Home option is the address you want people to enter their browser to access the WordPress blog.
  • The "Site URL" parameter is the address where your main WordPress files are located.
+2
source

In the settings, is your Wordpress and site address correctly set?

+1
source

Source: https://habr.com/ru/post/950923/


All Articles