Skip to content

Instantly share code, notes, and snippets.

View AshMartian's full-sized avatar
🌎
Kinder world with code

Ash Martian AshMartian

🌎
Kinder world with code
View GitHub Profile
@AshMartian
AshMartian / wordpress-change-domain-migration.sql
Last active June 29, 2018 16:32 — forked from chuckreynolds/wordpress-change-domain-migration.sql
Use this SQL script when changing domains on a WordPress site. Whether you’re moving from an old domain to a new domain or you’re changing from a development domain to a production domain this will work. __STEP1: always backup your database. __STEP2: change the ‘oldsite.com’ and ‘newsite.com’ variables to your own. __STEP3: make sure your databa…
SET @oldsite='psd401.net';
SET @newsite='lauri-dev.psd401.net';
DROP PROCEDURE IF EXISTS setoptions;
DELIMITER $$;
CREATE PROCEDURE setoptions()
BEGIN
DECLARE done INT DEFAULT 0;
DECLARE site VARCHAR(255) DEFAULT NULL;