• Hello, I have a lot of WordPress blogs installed in one database. Is it possible to run a sql-query to search and replace the permalink-structure for all blogs?

    If so, how could this be done?

Viewing 1 replies (of 1 total)
  • It’s easy. All you have to do is update the post_content and the guid.

    UPDATE wp_posts SET guid = REPLACE (
    guid,
    'https://exampleoldsiteurl.com',
    'https://examplenewsiteurl.com');
    
    UPDATE wp_posts SET post_content = REPLACE (
    post_content,
    'https://exampleoldsiteurl.com',
    'https://examplenewsiteurl.com');

    I’m not too familiar with multisite, but that’s what I do for a single site when the URL has changed.

Viewing 1 replies (of 1 total)
  • The topic ‘Search/Replace Permalinks in database?’ is closed to new replies.