![]() |
![]() |
![]() |
||||
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. |
![]() ![]() |
|
Discuss what's fucking going on, and which programs are best and worst. One-time "program" announcements from "established" webmasters are allowed. |
|
Thread Tools |
![]() |
#1 |
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
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#2 |
Let slip the dogs of war.
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?
__________________
. |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#3 |
Too lazy to set a custom title
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/");
__________________
![]() ![]() ![]() It's all disambiguation ![]() |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#4 |
Confirmed User
Industry Role:
Join Date: Aug 2004
Location: Europe
Posts: 1,025
|
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#5 |
Confirmed User
Industry Role:
Join Date: Aug 2004
Location: Europe
Posts: 1,025
|
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#6 |
Let slip the dogs of war.
Industry Role:
Join Date: Jan 2003
Location: Bermuda
Posts: 17,263
|
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?
__________________
. |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#7 | |
aliasx
Join Date: Apr 2001
Posts: 19,010
|
Quote:
![]()
__________________
https://porncorporation.com |
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#8 |
Too lazy to set a custom title
Industry Role:
Join Date: Jul 2001
Location: Currently Incognito
Posts: 13,827
|
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.
__________________
![]() ![]() ![]() It's all disambiguation ![]() |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#9 |
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 ![]() |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#10 |
Too lazy to set a custom title
Industry Role:
Join Date: Jul 2001
Location: Currently Incognito
Posts: 13,827
|
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.
__________________
![]() ![]() ![]() It's all disambiguation ![]() |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#11 |
Confirmed User
Industry Role:
Join Date: Aug 2005
Location: YUROP
Posts: 8,595
|
__________________
![]() Anal Webcams | Kinky Trans Cams Live | Hotwife XXX Tube | Get your Proxies here |
![]() |
![]() ![]() ![]() ![]() ![]() |