Migrating A WordPress Website From HTTP To HTTPS - A Complete Guide
Migrating A WordPress Website From HTTP To HTTPS - A Complete Guide
ADVERTISEMENT
SEJ » SEO
Moving a WordPress
Website from HTTP to
HTTPS: A Complete
Guide
https://webcache.googleusercontent.com/search?q=cache:mMUK6PHIhjcJ:https://www.searchenginejournal.com/wordpress-http-to-https/236969/+&cd=1&hl=es-419&
11/5/2018 Migrating a WordPress Website from HTTP to HTTPS: A Complete Guide
1.4K 5.8K
SHARES READS
Vahan Petrosyan
February 21, 2018
SEJ STAFF
676
568
141
https://webcache.googleusercontent.com/search?q=cache:mMUK6PHIhjcJ:https://www.searchenginejournal.com/wordpress-http-to-https/236969/+&cd=1&hl=es-419&
11/5/2018 Migrating a WordPress Website from HTTP to HTTPS: A Complete Guide
Just recently, Google set July 2018 as the deadline for HTTPS
publishers
implementation. The company warned that, for any
HTTP domains, Chrome will display a “not secure” label in
the address bar.
In this post, I will share the experience I had from migrating the
SEJ website to HTTPS and many other WordPress-based
websites I’ve worked on.
https://webcache.googleusercontent.com/search?q=cache:mMUK6PHIhjcJ:https://www.searchenginejournal.com/wordpress-http-to-https/236969/+&cd=1&hl=es-419&
11/5/2018 Migrating a WordPress Website from HTTP to HTTPS: A Complete Guide
Fig. 1
https://webcache.googleusercontent.com/search?q=cache:mMUK6PHIhjcJ:https://www.searchenginejournal.com/wordpress-http-to-https/236969/+&cd=1&hl=es-419&
11/5/2018 Migrating a WordPress Website from HTTP to HTTPS: A Complete Guide
Fig. 2
HostGator
GoDaddy
Bluehost
Images
JavaScript files
CSS files
Internal URLs used in CSS/JavaScript files
iframes
Videos
Audio
Form actions
Fonts
Let’s start the migration process. (To perform the steps below,
you may use Notpad++, PhpStorm or other code editors of yours.
I use ZendStudio.)
https://webcache.googleusercontent.com/search?q=cache:mMUK6PHIhjcJ:https://www.searchenginejournal.com/wordpress-http-to-https/236969/+&cd=1&hl=es-419&
11/5/2018 Migrating a WordPress Website from HTTP to HTTPS: A Complete Guide
Use the regex for “www” and without “www” URL cases and
search for http:\/\/(www\.)?yourdomain\.com
Fig. 3
https://webcache.googleusercontent.com/search?q=cache:mMUK6PHIhjcJ:https://www.searchenginejournal.com/wordpress-http-to-https/236969/+&cd=1&hl=es-419&
11/5/2018 Migrating a WordPress Website from HTTP to HTTPS: A Complete Guide
Fig. 4
Fig. 5
You need to perform the same in your Plugins folder if you have
custom-developed plugins which are not hosted at
wordpress.org/plugins.
https://webcache.googleusercontent.com/search?q=cache:mMUK6PHIhjcJ:https://www.searchenginejournal.com/wordpress-http-to-https/236969/+&cd=1&hl=es-419&
11/5/2018 Migrating a WordPress Website from HTTP to HTTPS: A Complete Guide
Fig. (6)
Fig. (7)
On the right section of the browser tree, we can see all instances
of the HTTP resources.
Don’t jump to replace all of them into HTTPS just yet! This is
because the external HTTP domain, which the resource is
pointing to, may not have an SSL certificate installed and may
not support an HTTPS connection.
https://webcache.googleusercontent.com/search?q=cache:mMUK6PHIhjcJ:https://www.searchenginejournal.com/wordpress-http-to-https/236969/+&cd=1&hl=es-419&
11/5/2018 Migrating a WordPress Website from HTTP to HTTPS: A Complete Guide
Fig. 8
However, doing this is not always possible for most cases. You
either need to re-develop or just get rid of that functionality.
Forms actions,
example: <form action="http://example.com/">
you can search for action=”http://
https://webcache.googleusercontent.com/search?q=cache:mMUK6PHIhjcJ:https://www.searchenginejournal.com/wordpress-http-to-https/236969/+&cd=1&hl=es-419&
11/5/2018 Migrating a WordPress Website from HTTP to HTTPS: A Complete Guide
Assuming you went through all of your files, let’s go forward and
fix our database.
ADVERTISEMENT
If you navigate to
yourdomain.com/replace879846513134984451 URL, you will
see the following:
https://webcache.googleusercontent.com/search?q=cache:mMUK6PHIhjcJ:https://www.searchenginejournal.com/wordpress-http-to-https/236969/+&cd=1&hl=es-419&
11/5/2018 Migrating a WordPress Website from HTTP to HTTPS: A Complete Guide
Fig. 9
In this case, again, you need to replace all your domain HTTP
instances with HTTPS since an SSL certificate is installed and
your domain supports HTTPS.
Fig. 10
https://webcache.googleusercontent.com/search?q=cache:mMUK6PHIhjcJ:https://www.searchenginejournal.com/wordpress-http-to-https/236969/+&cd=1&hl=es-419&
11/5/2018 Migrating a WordPress Website from HTTP to HTTPS: A Complete Guide
Fig. 11
Clicking the Import button will start downloading images from the
external website to your server and replace external images
URLs with your domain HTTPS ones.
Assuming you were able to fix your images, there are still
iframes, videos, and audio left.
The first and easiest step you can do is to perform the same
search and replace operation (see: Fig. 10) for all well-known
video/audio hostings, like YouTube, Vimeo, SoundCloud, etc.
Here is a code snippet you can run to extract all posts which
contains src=”http://”.
https://webcache.googleusercontent.com/search?q=cache:mMUK6PHIhjcJ:https://www.searchenginejournal.com/wordpress-http-to-https/236969/+&cd=1&hl=es-419&
11/5/2018 Migrating a WordPress Website from HTTP to HTTPS: A Complete Guide
After you run this query you will get a list of all posts that have
HTTP source and mixed content issue.
When you are sure everything is done right, the final step is to
set up 301 redirects from HTTP URLs to HTTPS.
3. Implement Redirects
If your server runs on Apache, here is the code you can put in
your .htaccess file.
RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=30
https://webcache.googleusercontent.com/search?q=cache:mMUK6PHIhjcJ:https://www.searchenginejournal.com/wordpress-http-to-https/236969/+&cd=1&hl=es-419&
11/5/2018 Migrating a WordPress Website from HTTP to HTTPS: A Complete Guide
4. Update CDN
If you use a CDN, there should be a URL setting similar to
Google Analytics where you can update your website to an
HTTPS version.
The migration for each CDN is different and you need to check
your CDN provider documents or contact support for details how
to do that.
https://webcache.googleusercontent.com/search?q=cache:mMUK6PHIhjcJ:https://www.searchenginejournal.com/wordpress-http-to-https/236969/+&cd=1&hl=es-419&
11/5/2018 Migrating a WordPress Website from HTTP to HTTPS: A Complete Guide
6. Resubmit Website in
Search Console
Since Google treats http://www.example.com and
https://www.example.com as different websites, you have to
resubmit your website’s HTTPS version to Google Search Conole
and claim ownership to this property.
https://webcache.googleusercontent.com/search?q=cache:mMUK6PHIhjcJ:https://www.searchenginejournal.com/wordpress-http-to-https/236969/+&cd=1&hl=es-419&
11/5/2018 Migrating a WordPress Website from HTTP to HTTPS: A Complete Guide
Conclusion
https://webcache.googleusercontent.com/search?q=cache:mMUK6PHIhjcJ:https://www.searchenginejournal.com/wordpress-http-to-https/236969/+&cd=1&hl=es-419&
11/5/2018 Migrating a WordPress Website from HTTP to HTTPS: A Complete Guide
Image Credits
https://webcache.googleusercontent.com/search?q=cache:mMUK6PHIhjcJ:https://www.searchenginejournal.com/wordpress-http-to-https/236969/+&cd=1&hl=es-419&
11/5/2018 Migrating a WordPress Website from HTTP to HTTPS: A Complete Guide
ADVERTISEMENT
Related Posts
https://webcache.googleusercontent.com/search?q=cache:mMUK6PHIhjcJ:https://www.searchenginejournal.com/wordpress-http-to-https/236969/+&cd=1&hl=es-419&
11/5/2018 Migrating a WordPress Website from HTTP to HTTPS: A Complete Guide
https://webcache.googleusercontent.com/search?q=cache:mMUK6PHIhjcJ:https://www.searchenginejournal.com/wordpress-http-to-https/236969/+&cd=1&hl=es-419&
11/5/2018 Migrating a WordPress Website from HTTP to HTTPS: A Complete Guide
https://webcache.googleusercontent.com/search?q=cache:mMUK6PHIhjcJ:https://www.searchenginejournal.com/wordpress-http-to-https/236969/+&cd=1&hl=es-419&
11/5/2018 Migrating a WordPress Website from HTTP to HTTPS: A Complete Guide
ADVERTISEMENT
https://webcache.googleusercontent.com/search?q=cache:mMUK6PHIhjcJ:https://www.searchenginejournal.com/wordpress-http-to-https/236969/+&cd=1&hl=es-419&
11/5/2018 Migrating a WordPress Website from HTTP to HTTPS: A Complete Guide
Vahan Petrosyan
ADVERTISEMENT
Subscribe to SEJ
Get our weekly newsletter from SEJ's
Founder Loren Baker about the latest
news inthe industry!
First Name*
Last Name*
Email*
https://webcache.googleusercontent.com/search?q=cache:mMUK6PHIhjcJ:https://www.searchenginejournal.com/wordpress-http-to-https/236969/+&cd=1&hl=es-419&
11/5/2018 Migrating a WordPress Website from HTTP to HTTPS: A Complete Guide
SUBSCRIBE
https://webcache.googleusercontent.com/search?q=cache:mMUK6PHIhjcJ:https://www.searchenginejournal.com/wordpress-http-to-https/236969/+&cd=1&hl=es-419&
11/5/2018 Migrating a WordPress Website from HTTP to HTTPS: A Complete Guide
Video
ADVERTISEMENT
ADVERTISEMENT
Home
https://webcache.googleusercontent.com/search?q=cache:mMUK6PHIhjcJ:https://www.searchenginejournal.com/wordpress-http-to-https/236969/+&cd=1&hl=es-419&
11/5/2018 Migrating a WordPress Website from HTTP to HTTPS: A Complete Guide
Jobs
About
Contact
Privacy Policy
Press Materials
Advertise
Youtube
Subscribe to SEJ
Get our weekly newsletter from SEJ's Founder Loren Baker about the latest news in the industry!
https://webcache.googleusercontent.com/search?q=cache:mMUK6PHIhjcJ:https://www.searchenginejournal.com/wordpress-http-to-https/236969/+&cd=1&hl=es-419&