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 06-06-2016, 04:59 AM   #1
klinton
So Fucking Banned
 
Industry Role:
Join Date: Apr 2003
Location: online
Posts: 8,766
help with wordpress - mass change of links

I have few hundreds posts in wordpress site. Each post has some link url which is like
Code:
http://aa.com/hereisvariable
, and I would like to mass change all of these urls to
Code:
http://newurl.com
how to do that ? I try to play with search regex plugin, but how no idea how to do that task....
klinton is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 06-06-2016, 05:04 AM   #2
j3rkules
VIP
 
j3rkules's Avatar
 
Industry Role:
Join Date: Jul 2013
Posts: 22,104
The next time you can use an affiliate link cloaking plugin so you do not need to change the link in all posts manually.

Here what you can do:

1. Download your wordpress database and saved it as a backup.

2. Copy the backup to another location and opened it in a text editor (text wrangler in my case).

3. Search for the old link, then used the 'replace all' command to replace it with the new one. It found several thousand instances of the old link and replaced them all.

4. In PHPmyAdmin, drop all the tables then import the modified database file. All of the links will be fixed.
j3rkules is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 06-06-2016, 05:07 AM   #3
wehateporn
Promoting Debate on GFY
 
wehateporn's Avatar
 
Industry Role:
Join Date: Apr 2007
Posts: 27,172
How to Perform Mass Search and Replace in Wordpress - Hongkiat
__________________
wehateporn is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 06-06-2016, 05:07 AM   #4
Denny
Too lazy to set a custom title
 
Denny's Avatar
 
Industry Role:
Join Date: Feb 2005
Posts: 17,088
https://cs.wordpress.org/plugins/search-and-replace/
__________________
Denny is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 06-06-2016, 05:10 AM   #5
klinton
So Fucking Banned
 
Industry Role:
Join Date: Apr 2003
Location: online
Posts: 8,766
no idea how to use it correctly, as the urls that I need to change are on the same domain, but later they change, like
Code:
http://steadydomain.com/butnewurleverytime
Quote:
Originally Posted by Denny View Post
klinton is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 06-06-2016, 05:27 AM   #6
wehateporn
Promoting Debate on GFY
 
wehateporn's Avatar
 
Industry Role:
Join Date: Apr 2007
Posts: 27,172
__________________
wehateporn is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 06-06-2016, 05:31 AM   #7
klinton
So Fucking Banned
 
Industry Role:
Join Date: Apr 2003
Location: online
Posts: 8,766
so how to mark that I need to remove all links from domain xxx.com while these links will be like xxx.com/1link, xxx.com/2link , xxx.com/whateverlink and so on ?

Quote:
Originally Posted by wehateporn View Post
klinton is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 06-06-2016, 05:58 AM   #8
wehateporn
Promoting Debate on GFY
 
wehateporn's Avatar
 
Industry Role:
Join Date: Apr 2007
Posts: 27,172
Quote:
Originally Posted by klinton View Post
so how to mark that I need to remove all links from domain xxx.com while these links will be like xxx.com/1link, xxx.com/2link , xxx.com/whateverlink and so on ?
Just read your question properly, I'm guessing it's using the % wildcard, xxx.com%, but this is not my thing, so best wait for someone who knows this stuff to appear
__________________
wehateporn is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 06-06-2016, 06:12 AM   #9
klinton
So Fucking Banned
 
Industry Role:
Join Date: Apr 2003
Location: online
Posts: 8,766
yeah, who would expect that... the guy that spams board with some conspiracy shit stories would have problem with comprehending text...

anyway, I found solution using php delimiters and search regex plugin.
php delimiter to url link is
Code:
/<a [^>]+>/i
Quote:
Originally Posted by wehateporn View Post
Just read your question properly, I'm guessing it's using the % wildcard, xxx.com%, but this is not my thing, so best wait for someone who knows this stuff to appear
klinton is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 06-06-2016, 06:14 AM   #10
wehateporn
Promoting Debate on GFY
 
wehateporn's Avatar
 
Industry Role:
Join Date: Apr 2007
Posts: 27,172
Quote:
Originally Posted by klinton View Post
yeah, who would expect that... the guy that spams board with some conspiracy shit stories would have problem with comprehending text...

anyway, I found solution using php delimiters and search regex plugin.
php delimiter to url link is
Code:
/<a [^>]+>/i
I didn't sleep well last night, but yes I do find conspiracies more interesting than SQL and I have started skimming a bit too much on GFY

Glad you got a solution
__________________
wehateporn is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 06-06-2016, 06:30 AM   #11
j3rkules
VIP
 
j3rkules's Avatar
 
Industry Role:
Join Date: Jul 2013
Posts: 22,104
Quote:
Originally Posted by klinton View Post
so how to mark that I need to remove all links from domain xxx.com while these links will be like xxx.com/1link, xxx.com/2link , xxx.com/whateverlink and so on ?
Item to replace "http://aa.com/hereisvariable" to "http://newurl.com"

I am bit late... it seems that you have found a solution.
j3rkules 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

Tags
wordpress, change, mass, http://newurl.com, urls, regex, idea, task, plugin, play, search, posts, site, hundreds, links, post, url, link



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.