Moving a WordPress site to HTTPS

An existing WordPress site shall be moved from HTTP to HTTPS. All resources should be loaded via HTTPS after the update. Therefore, all text occurrences, hyperlinks and image resources in pages and posts must be updated with the new URL.
1 answer

First, the Site Address and the WordPress address need to be updated. Go to Settings->General in the WordPress administration area and change the value of these two settings to the new URL. New contents are now created with HTTPS.

Unfortunately, changing the site address does not update URLs in existing contents, so a SQL-Statement to replace the old URLs with new one is required (replace example.org with the URL of the site to move):

UPDATE wp_posts SET post_content = REPLACE(post_content, 'http://www.example.org', 'https:// www.example.org)