Using a redirect from your web server isn’t the best solution in my opinion.
Instead, why not fix directly the content of your database? (using https://
instead of http://
everywhere?
You could do that using a WordPress plugin such as WP Migrate DB or the command line tool WP-CLI.
Using the plugin option (WP Migrate DB
), in the administration go to Tools
> Migrate DB
.
Using the command line tool (WP-CLI
), use the following command line: wp search-replace http://oldurl.com https://oldurl.com
After applying one of these two solutions, you should have a correct site that uses https
urls instead of http
.
Related Posts:
- Why is WordPress redirecting from http to https on a local environment?
- Force HTTPS using .htaccess – stuck in redirect loop
- How to redirect url requests to https? [closed]
- WordPress redirect loop on nginx + apache reverse proxy
- Mixed Content with SSL, wordpress behind a reverse proxy
- https multiple redirects
- Disabling HTTPS redirection for migration
- Strange redirection issues on wordpress from ssl with padlock to ssl without padlock
- How do I map a subdomain in wordpress to the primary domain in a multisite setup?
- WordPress Redirecting HTTPS Requests to HTTP
- Infinite loop behind SSL proxy on non-standard port
- What is the right way to redirect all traffic to HTTPS?
- SSL and www to non-www redirection works only on homepage – WordPress
- ReDirect subfolder link to another sub-folder and force SSL
- WordPress CSS/Theme gone after SSL got activated
- My site doesn’t redirect from HTTP to HTTPS
- Only execute function if SSL is set up properly
- HTTPS to HTTP rewrite rules not working as expected
- Browsers Forcing Multisite to https
- Is the default value of FORCE_SSL_ADMIN documented?
- 301 Redirect Loop www to non-www – Nginx + Apache2
- I get “too many redirects” problem when migrating localhost site
- redirect_to ignoring the SSL
- Moving site from HTTP to HTTPS
- I have cloudflare flexible enabled, How to redirect to https for Nginx server
- Force SSL on a single page which is used as iFrame
- How to map secure.domain.com to www.domain.com or domain.com with “WordPress MU Domain Mapping” on the primary multisite domain?
- How to force HTTP and stop SSL completey on WordPress website
- How to force a 404 on WordPress
- Disable ONLY URL auto complete, not the whole canonical URL system
- 301 redirect instead of 404 when URL is a prefix of a post or page name?
- Correct way to hide pseudo pages from being shown?
- Htaccess redirect from ‘/%postname%.html’ to ‘/%postname%’
- Redirect to post after submission with Gravity Forms? [closed]
- Stop WordPress Redirection From /keyword to /some-post-containing-keyword/
- Specific URL has 403 Forbidden status code
- Prevent redirect to page/page when reserved term ‘name’ in $_POST when value is a page/post title
- I want to redirect the url to the previous page
- Headers already sent – WordPress core
- Import WordPress Post Slug with Forward Slash
- Create a php callback/endpoint for an OAuth script
- Why specific file directory fails to redirect but its parent folder succeeds?
- Cant Access Website – Changed HTTP to HTTPs
- How to remove “YEAR/MONTH/” from uploads URL & redirect old URL to the new form?
- How to redirect user to a page after form submission
- Too many redirects when using wp super cache [closed]
- How do I redirect a user when he is logged in after clicking on a menu
- Redirect 301 www.my-site.com/page/n to www.my-site.com/ [closed]
- Redirect not logged in users if they are on a specific page
- How to set up a single portfolio page as home page?
- 301 Redirect To Post ID
- Redirect after password update
- How code a redirect back to page from form thanks
- How to add new redirection on wordpress site
- redirecting and showing notice from previous action
- Make posts 410 dynamically
- Redirect homepage with htaccess, except if I enter the link adding “/home”
- Buddyboss Platform plugin causing “too many redirects”
- Always redirect current user to certain page
- How to redirect to clean links with this code
- How can I make my WordPress site redirect to subdomain once successfully login they will redirect back to root domain
- 301 Redirect all page and post urls from .html to /
- wordpress_redirect returns different headers for HEAD and GET requests
- Login/Register redirect user with message
- My site is being redirected to itself
- Redirect Attachment Page to Attachment
- Front page is being directed to an unknown site
- Redirect away from page if user is not admin
- Domain redirect to wp-admin/setup-config.php file
- Redirect to parent page if child does not exist
- Conditional Redirect
- Redirection with a wildcard
- Redirect Page ID, based on logged-in User Role
- How can I stop redirecting from a search to a taxonomy archive page
- How to return a 410 code for previously published posts now set to draft?
- htaccess redirect not working for wp-admin/edit in site using proxy
- How to access my wordpress application using two URLs?
- Redirect Pending Review Status Preview page url to custom url
- Debugging issue with redirection in WordPress
- The / location 301-redirects to itself in a loop
- www redirects to another directory in wordpress
- Internal Redirections?
- Need to redirect from Apache2 Ubuntu Default Page to home page in wordpress
- WordPress website down with error “redirected you too many times.”
- Using cache brokes redirecting
- Is it possible to take a new visitor to the site to a disclaimer page and then return them to their previous page?
- Homepage (domain) that redirects user toward two subdomains based on his/her preferred language
- redirect to another page if user has registered successfully
- WordPress redirect users from certain countries to subpage of language version
- Unable to access WP test site
- Custom Login Plugin Redirects to wp-login.php After Site Migration
- New clone of WordPress site 301 redirects back to orginal site
- Show page without reference to post (like front-page)
- How to redirect all pages of a blog to a new blog
- WordPress as a Facebook app
- URL Custom Rewrite
- How to handle expired assets/content when user has direct URL
- Best SEO way to redirect from all “posts” to home url
- How to force or redirect to SSL in nginx?
- After migration index page still redirects to old url