Posts Tagged ‘fix’

Fixing links on an exported WordPress Blog with MySQL Replace

Sunday, August 21st, 2011

One we problem I ran into when exporting is that most of my resized images did not pull through. So my post would call for someImage-400×266.jpg though the import only grabbed someImage.jpg and not its variants.

The fix was pretty easy, though. I just used Replace. Do a datadump of your wp_posts table beforehand, just in case, and then:

update `wp_posts` set post_content = replace(post_content,’-400×266.jpg’,’.jpg’);

I had a few other variants like 400×300.jpg or 400×400.jpg depending on the aspect ratio — obviously you’ll want to use sizes that are in use at your own site — but but for the most part this went smashingly. Hoping that helps someone. :)

Boo!

Sunday, October 31st, 2004

So, being child of the 80s and horrible mom I am, I let my son dress up as his favorite Nintendo character. The “horrible mom” part comes in where my 3 year old is almost as good at Nintendo as I am. Scary, isn’t it? (more…)