GoFuckYourself.com - Adult Webmaster Forum

GoFuckYourself.com - Adult Webmaster Forum (https://gfy.com/index.php)
-   Fucking Around & Business Discussion (https://gfy.com/forumdisplay.php?f=26)
-   -   help with wordpress - mass change of links (https://gfy.com/showthread.php?t=1200794)

klinton 06-06-2016 04:59 AM

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....

j3rkules 06-06-2016 05:04 AM

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.

wehateporn 06-06-2016 05:07 AM

How to Perform Mass Search and Replace in Wordpress - Hongkiat

Denny 06-06-2016 05:07 AM

https://cs.wordpress.org/plugins/search-and-replace/

klinton 06-06-2016 05:10 AM

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 (Post 20942810)


wehateporn 06-06-2016 05:27 AM


klinton 06-06-2016 05:31 AM

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 (Post 20942837)


wehateporn 06-06-2016 05:58 AM

Quote:

Originally Posted by klinton (Post 20942852)
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 :thumbsup

klinton 06-06-2016 06:12 AM

yeah, who would expect that... the guy that spams board with some conspiracy shit stories would have problem with comprehending text...:winkwink::winkwink::winkwink::winkwink:

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 (Post 20942897)
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 :thumbsup


wehateporn 06-06-2016 06:14 AM

Quote:

Originally Posted by klinton (Post 20942912)
yeah, who would expect that... the guy that spams board with some conspiracy shit stories would have problem with comprehending text...:winkwink::winkwink::winkwink::winkwink:

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 :winkwink:

Glad you got a solution :thumbsup

j3rkules 06-06-2016 06:30 AM

Quote:

Originally Posted by klinton (Post 20942852)
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.


All times are GMT -7. The time now is 07:15 AM.

Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
©2000-, AI Media Network Inc