After enabling SSL the website loads in HTML. CSS and JS files load only in HTTP(view source) and the admin page does not load either.
Tried implementing all solutions like rewrite condition to force https, wp-config file, ssl plugins. Nothing works.
Now the entire website has mixed content of http(CSS and JS) and https(HTML).
After enabling SSL the website loads in HTML. CSS and JS files load only in HTTP(view source) and the admin page does not load either.
Tried implementing all solutions like rewrite condition to force https, wp-config file, ssl plugins. Nothing works.
Now the entire website has mixed content of http(CSS and JS) and https(HTML).
If I understand your issue correctly, you're having a "Mixed Content" error, and it happens when a site that's supposed to be served over HTTPS (secure) is also serving some of its content over HTTP (non-secure). In your case, it appears that your CSS and JavaScript files are being served over HTTP, which is causing the problem.
First, ensure that your website's URL in the WordPress settings is using HTTPS. You can do this by going to "Settings" > "General" in the WordPress admin area. Both the "WordPress Address (URL)" and "Site Address (URL)" should start with https://
.
If that's already correct, or if changing it doesn't fix the issue, you'll need to replace all the HTTP URLs in your database with HTTPS (if you haven't tried it yet). Note that this should be done carefully, as making mistakes in your database can break your site. So to do that, you'll need to use a plugin like Better Search Replace
Here's some step-by-step that you can follow as a guide:
http://
(e.g., http://yourdomain.com).https://
(e.g., https://yourdomain.com).Remember to deactivate and delete the Better Search Replace plugin when you're done using it.
And if you're using a caching plugin, don't forget to clear your site's cache and your browser's cache to make sure you're seeing the latest changes of your site.
If you are not comfortable with changing database values using the Better Search Replace plugin, you can also try using the Really Simple SSL plugin to force your WordPress installation to use HTTPS on all of its pages and resources.
wp_options
database table updated? If a multisite, then siteurl in thewp_sitemeta
database table needs to be updated. These updates can be done using WordPress Admin pages. Alternatively, you can use the wp_config.php constants WP_HOME and WP_SITEURL. The link to the WordPress help page Changing The Site URL should be helpful. – kofeigen Commented May 13, 2023 at 21:53.htaccess
unless you've already made changes that need to be reversed. If updating tables manually using phpMyAdmin's Find and replace, check to see if URLs exist in other database tables like wp_termmeta. – kofeigen Commented May 14, 2023 at 19:48