I installed https on a website. I did these steps :
- locate the certificate SSL
- Added redirections in .htaccess
- Changed in database all into
I don´t understand what is the link betweeen these tasks and the theme options. Someone has got an idea ?
More explanation
About Database changes
To do this changes in database, I made my own plugin which run first of all a "select" to do a check in before replace strings. A way to control what I´m doing.
For the moment I replaced "" by "" in these tables/columns:
- options -> option_value
- posts -> post_content
- posts -> guid
- comments -> comment_author_url
- comments -> comment_content
- postmeta -> meta_value
It seems to be insufficient
I installed https on a website. I did these steps :
- locate the certificate SSL
- Added redirections in .htaccess
- Changed in database all http://mon-site.fr into https://mon-site.fr
I don´t understand what is the link betweeen these tasks and the theme options. Someone has got an idea ?
More explanation
About Database changes
To do this changes in database, I made my own plugin which run first of all a "select" to do a check in before replace strings. A way to control what I´m doing.
For the moment I replaced "http://my-site" by "https://my-site" in these tables/columns:
- options -> option_value
- posts -> post_content
- posts -> guid
- comments -> comment_author_url
- comments -> comment_content
- postmeta -> meta_value
It seems to be insufficient
Share Improve this question edited Apr 7, 2020 at 14:16 J.BizMai asked Apr 6, 2020 at 18:42 J.BizMaiJ.BizMai 9002 gold badges10 silver badges30 bronze badges 2- 2 When you sayyou changed the URL in the database, can you be more specific about how you did this? A lot of people just do a search replace via PHPMyAdmin, which breaks serialised PHP data, causing issues – Tom J Nowell ♦ Commented Apr 6, 2020 at 19:19
- Temporarily switch themes to a standard wordpress theme such as 2019 or 2020 and see if the issue goes away. Your theme may be creating the problem. I have found some plugins & themes write yoursite.blahblah into the database rather than relative links, in which case you can export your database, search for http and replace with https (selectively) as required. Then backup your old db and create a new one and import the data. – Admiral Noisy Bottom Commented Apr 6, 2020 at 22:52
2 Answers
Reset to default 0It seems no connection technically but you might break the serialized data in the database. Can you please try again with the Better Search Replace plugin https://wordpress/plugins/better-search-replace/ and see if it still breaks? If it's not then you are breaking the serialize data.
As @ShaikhAezaz said, when you run a simple replace in database for serialized data you got this :
s:18:"https://my-site"
instead of
s:19:"https://my-site"
That´s why serialized data are broken for theme options.