WordPress SQL Replace Localhost .local

SQL to replace wordpress from local to production.

UPDATE wp_posts SET post_content = replace(post_content, ‘https://local.domain.com.au’, ‘https://www.domain.com.au’);
UPDATE wp_postmeta SET meta_value = replace(meta_value, ‘https://local.domain.com.au’, ‘https://www.domain.com.au’);

Also do a text search in your SQL to find any other settings for plugins etc…

Sam Deering

Sam Deering is a web developer from England (currently living in Australia). In his spare time he enjoys coding, playing chess, reading and investing.

Leave a Reply

Your email address will not be published. Required fields are marked *