![]() |
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
|
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?
|
UPDATE wp_posts SET post_content = replace(post_content, "/replace-this/", "/with-this/");
|
Quote:
Single URL to a different Single URL |
Quote:
|
Quote:
|
Quote:
|
Quote:
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. |
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 :) |
Quote:
If you move to multisite from a standalone wp, you've gota run that to replace the content paths. |
|
All times are GMT -7. The time now is 09:24 PM. |
Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
©2000-, AI Media Network Inc