WordPress / WordPress/Documentation-Issue-Tracker

[Advanced Admin] New Page: How to move WordPress site from HTTP to HTTPS

Open
#19 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

advanced administration developer documentation (DevHub)
Dominant language
Shell
Stars
109
Forks
73
PR merge metrics
No merged PRs in 30d

Description

This issue was originally created as HelpHub #333 by atachibana and comment was added by ashfame.


There are two methods:

  1. Using the plugin
  2. Setting up WordPress manually (without plugin)

For above method 2, the step will be (but might be missing)

  1. Backup WordPress files and database
  2. Set SSL certificate
  3. Change WordPress URL from Administration Screen
  4. Replace the string 'http' to 'https' in the database contents
  5. Add redirect code into .htaccess

Comment by ashfame

I just switched an old site to refresh up my memory for the exact steps:

Actual Instructions
  • Take a backup of files and database in case you need to revert for whatever reasons.
  • Get your webhost to install a TLS (also referred to as SSL) certificate for your website
  • Once installed ensure that your website is accessible on https URL, by simply replacing http with https i.e. adding a s to it. Eg: If your website was http://www.domain.com, new URL would be https://www.domain.com
  • See if you have any errors in your browser console complaining about mixed content, as you browse different pages on your website. Usually when using good quality plugin and theme, there won't be an issue. But if you do, you will need to resolve these issues.
  • Once you are satisfied with the results and are ready to flip the switch, go ahead and update the website URL in WordPress admin: Settings > General.
  • Now if you try to access http version of your website you will be redirected to https version. Best to try in an incognito/private window in your browser to test this.
Potential issues:

http to https redirect isn't working

I am not sure if changing the URL in WordPress causes it to issue redirects, though I believe it does. I never use it, as I always handle redirects on a server level.

Mixed-content warnings

Depending on what resources are causing these errors, it can either be your theme, any plugin you use or actual content you load in post/page and requires a different approach for each one of them.

Post/page content requires you to replace string, can be done via this plugin https://wordpress.org/plugins/better-search-replace/

Theme/plugins would require using the right functions to generate URLs or simply update the hardcoded urls to be https.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing the original HelpHub #333 issue and the instructions in this issue. Draft the advanced admin page covering plugin and manual HTTP-to-HTTPS migration, including backups, TLS setup, URL changes, redirects, mixed-content warnings, and troubleshooting; done means the steps are complete and clearly organized.

Written by the indexing model from the issue text.

Assessment

Domain
documentation
Issue type
Documentation
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.