May
14th

WordPress: MySQL Search and Replace using PHPMyAdmin

Thanks for stopping by my personal blog on Marketing Technology! Over 50,000 visitors a month find my content worth returning for, so don't forget to subscribe to the Marketing Technology Blog RSS feed or to the Marketing Technology Email to have new content sent directly to your inbox. You may also find my other business blog helpful, Social Media Domination.

I made a slight modification to my page layouts today. I’ve read on John Chow’s blog and on Problogger’s blog that positioning your advertisement within the body of a post can result in a dramatic increase in revenue. Dean is working on his as well.

On Darren’s site, he writes that it’s simply a matter of the readers eye movement. When the banner is at the top of the page, the reader skips over it with no focus. However, when the advertisement is to the right of the content, the reader will actually skim over it.

You’ll notice that I still try to keep my home page clean - putting advertisements outside of the blog posts. I’m certain that changing that and making them more intrusive could make me more revenue; however, I’ve always fought that because it would really affect the readers I care about most - the ones that visit my home page daily.

One of the issues with putting this advertisement in the top right was that this is where I often place a graphic for aesthetic purposes and to dress up my feed and differentiate it from other feeds. I usually alternate a piece of clipart either right or left in the post using:

Image Left:
<img align=”left” src=”pic.jpg”>
Image Right:
<img align=”right” src=”pic.jpg”>

Note: Some folks like to utilize styles for this, but the alignment doesn’t work in your feed utilizing CSS.

Updating every post using Search and Replace:

To easily modify ever single image in every single post to ensure all my images are left justified can be done quite easily using an Update query in PHPMyAdmin for MySQL:

update table_name set table_field = replace(table_field, ‘replace_that’, ‘with_this’);

Specific to WordPress:
update `wp_posts` set `post_content` = replace(`post_content`, ‘replace_that’, ‘with_this’);

To correct my issue, I wrote the query to replace “image=’right’” with “image=’left’”.

NOTE: Be absolutely certain to backup your data prior to making this update!!!

RSS feed | Trackback URI

12 Comments »

Comment by no imageSlaptijack (SezWho)
2007-05-14 08:46:21

Looks good, Doug. I think the flow of your entries are maintained nicely.
Rate this:
2.9
Comment by no imageDouglas Karr (SezWho)
2007-05-14 18:58:03

Thanks Slaptijack! I modified my sub-heading size today and worked on some spacing in my CSS. Tweakin, tweakin, tweakin!
Rate this:
2.9
 
 
Comment by no imageDean Taplin (SezWho)
2007-05-14 11:50:26

Thanks for providing further information on this topic. I’ve seen ads left or right justified before on other web sites so it does seem a popular place. Your ads flow nicely on the right of the post.

I may switch to right justifying my ads too in the near future. It would be interesting to see if any further revenue is generated as a result.

Rate this:
2.9
Comment by no imageDouglas Karr (SezWho)
2007-05-14 18:34:52

I’m going to definitely track them. Overall impressions are down a little right now, so revenue is also lagging. I’m going to give it a few weeks to see! I’ll be sure to report on it.
Rate this:
2.9
 
 
Comment by no imageRick Cockrum (SezWho)
2007-05-14 14:51:50

Do you get anything with the banner ads on your index page, Doug? I didn’t do well with them.

In general, the in-post ads (180 and 250 wide) and the ads after a post (336 wide) have gotten the most attention.

Rate this:
2.9
Comment by no imageDouglas Karr (SezWho)
2007-05-14 18:56:59

Interesting, Rick. I actually messed up and haven’t been tracking the ads by page up until about a week ago. So far, no clicks on the main index page! It’s something I’m going to keep my eye on.

Thanks!

Rate this:
2.9
 
 
Comment by no imageDean Taplin (SezWho)
2007-05-15 14:16:14

Out of interest. Did you modify your template files to display the ads in your posts, or are you using a plugin to manage ad position.
Rate this:
2.9
Comment by no imageDouglas Karr (SezWho)
2007-05-15 20:58:56

Hi Dean,

I use a combination. I have the PostPost plugin I wrote… but it still doesn’t do what I really need. Perhaps a release or two in the future?

The rest I simply edit in my theme.

Doug

Rate this:
2.9
 
 
Trackback by SensibleWords
2007-05-15 14:51:58

Adsense positioning for Bloggers…

It’s self-evident, isn’t it - slap an advert, or several, bang in the middle of the viewport and increase your ROI or CPM or any acronym you care to name… or is it?
Yes, if you have a well-established site, lots of backlinks, stable t…

 
Comment by no imageanjali (SezWho)
2007-07-28 03:35:19

have a problem to update secondds with “right” join in mysql
UPDATE ivr_data SET RIGHT( TIME, 2 ) = ‘00′ WHERE RIGHT( TIME, 2 ) != ‘00′;
Rate this:
1.6
 
Comment by no imageDawud Miracle (SezWho)
2007-08-07 08:35:27

Hey Doug. Just used your instructions to update my email address in my WP DB. Worked like a charm. Thanks.

BTW, came across this post in Google, searching “using mysql search replace query.” Came up 3rd.

Rate this:
2.9
Comment by no imageDouglas Karr (SezWho)
2007-08-07 10:25:55

Woohoo! 3rd is good! My site seems to really have gotten some great placement in the Search Engines over the last year. Ironically, I rank above many Search Engine Blogs. :)
Rate this:
2.9
 
 
Name (required)
E-mail (required - never shown publicly)
URI
Your Comment (smaller size | larger size)
You may use <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> in your comment.

My Comment Policy: I moderate comments. Please be patient:

  • Spam will happily be destroyed.
  • Use your real name, not some keywords. Otherwise it will be destroyed.
  • Mean comments aren't necessary. If I don't post them I will reply personally to let you know why.
  • Lewd comments will be edited, I don't want my readers leaving because of offensive content.
Great debate, criticism and colorful commentary is always appreciated and approved!