Everything depends on your knowledge and time you want to dedicate ::
Via plugin
This option is the simplest:
link
With tools
link
With this tool, we will upload a copy of our DB and automatically replace the previous domain (http) with the new one (https)
Via Functions.php
Another way, is to perform some function in your functions.php that replaces all the http with https in the output, but basically it will be the same as the previous plugin.
Manual
As a last resort, and a bit more entertaining is to do everything manual:
In the wordpress config:
Adjustments - General we modify both the address of Wordpress, as the address of the site.
Next, force the WP administrator to write to wp-config.php:
define('FORCE_SSL_ADMIN', true);
Now it's time to download a copy of the complete website, where we will search http: // throughout the project to locate any unsafe protocol call, here it is not about replacing everything directly, but analyzing each appearance in detail to see if you really have to modify it.
Afterwards, update the links in your DB (you will have to update the SQL code, with as many formats as you need):
UPDATE wp_posts
SET post_content = ( Replace (post_content, 'src="http://', 'src="//') )
WHERE Instr(post_content, 'jpeg') > 0
OR Instr(post_content, 'jpg') > 0
OR Instr(post_content, 'gif') > 0
OR Instr(post_content, 'png') > 0;
In case you have single quotes:
UPDATE wp_posts
SET post_content = ( Replace (post_content, "src='http://", "src='//") )
WHERE Instr(post_content, 'jpeg') > 0
OR Instr(post_content, 'jpg') > 0
OR Instr(post_content, 'gif') > 0
OR Instr(post_content, 'png') > 0;
If you use custom options:
UPDATE wp_postmeta
SET meta_value=(REPLACE (meta_value, 'src="http://','src="//'));
Finally, we force HTTPS in apache:
RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]
Remarks
As you comment when you access the header template, you do not locate any direct resource load, this is because it is done through actions and hooks. You will probably find something of the style a: wp_head();
, this is the action that is responsible for generating all the content that is passed through the function files. Probably in your functions.php or maybe it is organized in another way depending on the template you use, is where you will find the calls to the resources of the website, so the way to locate the exact resources, you have to do a follow up of the code until you reach the result.
Greetings,