Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Wordpress - relative image path

I have blog on www.mydomain.com however, I wanted to move it on www.mydomain.com/blog In some posts I have images embedded like: < img src="/wp-content/uploads/2009/11/image.jpg" style="height: 200px; float: left; margin: 10px" >

But when I move it to www.mydomain.com/blog these photos surely won't display cause the photo will be in: www.mydomain.com/blog/wp-content/uploads/2009/11/image.jpg and this src will mean that it's in www.mydomain.com/wp-content/uploads/2009/11/image.jpg, what is not true.

How can I set the relatives paths of these photos so that after changing the destination of my blog they still will be displayed?

Greetings!

edit: stackoverflow cut html tags so I wrote them once again, sorry

like image 309
Bart Avatar asked Apr 15 '26 19:04

Bart


1 Answers

once you move your blog over, do a find and replace on the mysql database tables for the links.

Anywhere it sees .com/wp-content/ change it to .com/blog/wp-content/

I use this plugin. http://wordpress.org/extend/plugins/search-and-replace/

like image 55
cwhelms Avatar answered Apr 18 '26 17:04

cwhelms



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!