Skip to content

Instantly share code, notes, and snippets.

@sergeliatko
Created December 29, 2019 19:22
Show Gist options
  • Save sergeliatko/7ae818327526745e7ed7dc99f24c6603 to your computer and use it in GitHub Desktop.
Save sergeliatko/7ae818327526745e7ed7dc99f24c6603 to your computer and use it in GitHub Desktop.
SQL query to grab URL mapping for Squarespace from WP when your blog posts are on site root.
SELECT CONCAT( '/', `post_name`, ' -> /blog/', `post_name`, ' 301' ) FROM `wp_posts` WHERE `post_type` = 'post' AND `post_status` = 'publish'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment