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 Mark Forums Read
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-17-2011, 12:14 PM   #1
marktruman
Confirmed User
 
Industry Role:
Join Date: Aug 2004
Location: Europe
Posts: 1,025
Mass edit url in blog posts on wordpress?

So I have a ton of wordpress blogs, With a shitload of posts. Is there anyway to edit the url in them blog posts? I will be changing it to the same url. I think I heard of a way in phpmyadmin
marktruman is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 04-17-2011, 12:18 PM   #2
WarChild
Let slip the dogs of war.
 
WarChild's Avatar
 
Industry Role:
Join Date: Jan 2003
Location: Bermuda
Posts: 17,263
You want to change all occurrences of a single URL to a single new URL or you want to change multiple different URLS to be one new one?
__________________
.
WarChild is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 04-17-2011, 12:18 PM   #3
TheDoc
Too lazy to set a custom title
 
TheDoc's Avatar
 
Industry Role:
Join Date: Jul 2001
Location: Currently Incognito
Posts: 13,827
UPDATE wp_posts SET post_content = replace(post_content, "/replace-this/", "/with-this/");
__________________
~TheDoc - ICQ7765825
It's all disambiguation
TheDoc is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 04-17-2011, 12:21 PM   #4
marktruman
Confirmed User
 
Industry Role:
Join Date: Aug 2004
Location: Europe
Posts: 1,025
Quote:
Originally Posted by WarChild View Post
You want to change all occurrences of a single URL to a single new URL or you want to change multiple different URLS to be one new one?

Single URL to a different Single URL
marktruman is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 04-17-2011, 12:23 PM   #5
marktruman
Confirmed User
 
Industry Role:
Join Date: Aug 2004
Location: Europe
Posts: 1,025
Quote:
Originally Posted by TheDoc View Post
UPDATE wp_posts SET post_content = replace(post_content, "/replace-this/", "/with-this/");
is that a command, where is that entered?
marktruman is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 04-17-2011, 12:25 PM   #6
WarChild
Let slip the dogs of war.
 
WarChild's Avatar
 
Industry Role:
Join Date: Jan 2003
Location: Bermuda
Posts: 17,263
Quote:
Originally Posted by marktruman View Post
is that a command, where is that entered?
That's an SQL statement to update your database that drives yoru blog at the database level. You must have access to your MySQLServer, correct?
__________________
.
WarChild is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 04-17-2011, 12:27 PM   #7
alias
aliasx
 
alias's Avatar
 
Join Date: Apr 2001
Posts: 19,010
Quote:
Originally Posted by TheDoc View Post
UPDATE wp_posts SET post_content = replace(post_content, "/replace-this/", "/with-this/");
Nice.
__________________
https://porncorporation.com
alias is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 04-17-2011, 12:29 PM   #8
TheDoc
Too lazy to set a custom title
 
TheDoc's Avatar
 
Industry Role:
Join Date: Jul 2001
Location: Currently Incognito
Posts: 13,827
Quote:
Originally Posted by marktruman View Post
is that a command, where is that entered?
If you're unsure what that is, it's best to ask your host to run it for you.... just tell them exactly what you want found and replaced and most hosts will gladly do it for you.

Otherwise, enter php my admin, access the wp db, hit the post table, click the SQL tab at the top, and enter that line.... after you change out what to replace. Your wp_posts table may be named differently.

UPDATE wp_posts SET post_content = replace(post_content, "www.oldurl.com", "newurl.com");

Screwing this up though can really screw some shit up... the last tab at the top, whatever it is, will let you duplicate the post table & structure to a new table name - highly recommended doing this if you've never ran a command like this before.
__________________
~TheDoc - ICQ7765825
It's all disambiguation

Last edited by TheDoc; 04-17-2011 at 12:31 PM..
TheDoc is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 04-17-2011, 12:34 PM   #9
TheDA
Confirmed User
 
Industry Role:
Join Date: May 2006
Posts: 4,665
There's a way to do it from WP with a plug-in as well.

http://lesterchan.net/portfolio/programming/php/ The DB manager there lets you edit SQL at that level.

It also lets you backup your database before you do it in case you fuck it up
TheDA is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 04-17-2011, 12:34 PM   #10
TheDoc
Too lazy to set a custom title
 
TheDoc's Avatar
 
Industry Role:
Join Date: Jul 2001
Location: Currently Incognito
Posts: 13,827
Quote:
Originally Posted by alias View Post
Nice.
Thanks... I just moved a ton of sites to multisite, so the line is fresh on the brain.

If you move to multisite from a standalone wp, you've gota run that to replace the content paths.
__________________
~TheDoc - ICQ7765825
It's all disambiguation
TheDoc is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 04-17-2011, 12:41 PM   #11
Paul&John
Confirmed User
 
Paul&John's Avatar
 
Industry Role:
Join Date: Aug 2005
Location: YUROP
Posts: 8,595
http://downloads.wordpress.org/plugi...nd-replace.zip
__________________
Use coupon 'pauljohn' for a $1 discount at already super cheap NameSilo!
Anal Webcams | Kinky Trans Cams Live | Hotwife XXX Tube | Get your Proxies here
Paul&John 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
Thread Tools



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.