Welcome to the GoFuckYourself.com - Adult Webmaster Forum forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact us.

Post New Thread Reply

Register GFY Rules Calendar
Go Back   GoFuckYourself.com - Adult Webmaster Forum > >
Discuss what's fucking going on, and which programs are best and worst. One-time "program" announcements from "established" webmasters are allowed.

 
Thread Tools
Old 04-13-2012, 01:44 PM   #1
MyDogHasFleas
Confirmed User
 
Join Date: Apr 2008
Posts: 529
Search and replace for wordpress?

This is the problem that I have. I have an iframe ad in about 500 posts on a blog. I would like to replace this ad. I tried Find replace and another one. Neither of them seemed to work. Are there any plugins that can search for the iframe code in the posts and replace it with something else?
MyDogHasFleas is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 04-13-2012, 01:47 PM   #2
AaronM
Too lazy to set a custom title
 
AaronM's Avatar
 
Industry Role:
Join Date: Oct 2001
Location: ┌∩┐ ◣_◢ ┌∩┐
Posts: 46,909
Whatever you use for this, be very careful.

I had a search and replace plugin that worked fine...Until it didn't and it rewrote every one off my posts. Thankfully I had a current backup or I would have been completely screwed.
AaronM is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 04-13-2012, 01:53 PM   #3
Colmike9
(>^_^)b
 
Colmike9's Avatar
 
Industry Role:
Join Date: Dec 2011
Posts: 7,223
For that many posts, I would export the xml then open in notepad then find/replace all to delete or replace the iframe code then reimport (Test on a freehost or test WPMU subdomain to see if posts import correctly first before replacing posts) Find/replace plugins suck
__________________
Join the BEST cam affiliate program on the internet!
I've referred over $1.7mil in spending this past year, you should join in.
I make a lot more money in the medical field in a lab now, fuck you guys. Don't ask me to come back, but do join Chaturbate in my sig, it still makes bank without me touching shit for years..
Colmike9 is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 04-13-2012, 01:53 PM   #4
GFED
Confirmed User
 
GFED's Avatar
 
Industry Role:
Join Date: May 2002
Posts: 8,120
Yea, make sure you backup your shit and avoid this problem next time by using an ad management system or server side/php include instead of hardcopy.
GFED is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 04-13-2012, 01:55 PM   #5
just a punk
So fuckin' bored
 
just a punk's Avatar
 
Industry Role:
Join Date: Jun 2003
Posts: 32,384
Quote:
Originally Posted by MyDogHasFleas View Post
This is the problem that I have. I have an iframe ad in about 500 posts on a blog. I would like to replace this ad. I tried Find replace and another one. Neither of them seemed to work. Are there any plugins that can search for the iframe code in the posts and replace it with something else?
Th CyberSEO plugin can do that. It uses WP API to alter the posts instead of the direct MySQL manipulation. Thus it's much safer.
__________________
Obey the Cowgod
just a punk is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 04-13-2012, 02:42 PM   #6
neak
Confirmed User
 
Industry Role:
Join Date: Jan 2008
Posts: 168
UPDATE [your_table_name] SET [your_table_field] = REPLACE([your_table_field], '[string_to_find]' , '[string_to_be_replaced]');
neak is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 04-13-2012, 02:46 PM   #7
papill0n
Unregistered Abuser
 
Industry Role:
Join Date: Oct 2007
Posts: 15,547
or you could just use this plugin

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

which works perfectly
papill0n is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 04-14-2012, 02:46 AM   #8
adultforum
SEO SPECIALIST
 
adultforum's Avatar
 
Industry Role:
Join Date: Nov 2010
Location: Europe
Posts: 2,438
If you have access to wp database you can use a code like this in your phpMyAdmin -> mySQL:

UPDATE wp_posts SET post_content = replace( post_content, 'old text', 'new text' ) ;
UPDATE wp_posts SET post_content = REPLACE (post_content, ‘old text’, ‘adultforum.ro’);
UPDATE `table_name` SET `field_name` = replace(same_field_name, 'unwanted_text', 'wanted_text')
__________________
ICQ#: 376883609 Skype: AdultSEO

[email protected]
SEO Specialists - will make it happen.

Awesome domains for sale - Reserve yours now.

It’s never too late to MAKE MONEY with BITCOIN. Use this link and receive a 10% fee discount for 6 months.
adultforum is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Post New Thread Reply
Go Back   GoFuckYourself.com - Adult Webmaster Forum > >

Bookmarks



Advertising inquiries - marketing at gfy dot com

Contact Admin - Advertise - GFY Rules - Top

©2000-, AI Media Network Inc



Powered by vBulletin
Copyright © 2000- Jelsoft Enterprises Limited.