Skip to content

Instantly share code, notes, and snippets.

@BenFausch
Last active April 2, 2018 17:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save BenFausch/2db54ef8a42c129994e5640afef1f5ed to your computer and use it in GitHub Desktop.
Save BenFausch/2db54ef8a42c129994e5640afef1f5ed to your computer and use it in GitHub Desktop.
wordpress https updates
.htaccess file will need the following:
RewriteEngine On
RewriteCond %{HTTP:X-Forwarded-SSL} !on
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]
run this sql:
UPDATE wp_posts SET `post_content` = REPLACE (`post_content`, 'src="http://digitalbureau.com', 'src="https://digitalbureau.com');
UPDATE digitalbureau_com.wp_posts SET `guid` = REPLACE (`guid`, 'http://digitalbureau.com', 'https://digitalbureau.com') WHERE post_type = 'attachment';
src:
https://premium.wpmudev.org/blog/replacing-image-links/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment