I’m trying to set up SSL on my site http://www.styzic.com/
Do I need to change something (like URLs) in the theme files or anything else? :/
Only stuff I’ve had to deal with are:
1) setting site URL in the WP settings to https
2) reset logos in panel to https://
3) search/replace dbase to set any “placed” images to https vs http (e.g., if you place an image in middle of post using media manager, it is “in the text” as http … that’s part of the body post, and doesn’t update
4) consider setting /paths/to/ in the wp-config.php to optimize that
Any placed local ads or graphics in widgets also need https: obviously
Thanks Chris đ
3. Can i do it by changing “http://” to “https://” with sql query?
4. I don’t get u đ
3. If you are going to do that, use a tool like this: https://interconnectit.com/products/search-and-replace-for-wordpress-databases/ Simply replacing it via a simple query can break serialized arrays.
If you have any links that aren’t local, this will also break them, as I’m sure you’re aware. A link to a Microsoft press release, for example. You can avoid that result by excluding the wp_posts table or even the content column (I forget its exact name) in that tool. I think that’s where you’d probably have most such links.
Template files would not be affected by a db query.
In future, I would try to make as many internal links as you can relative, i.e. instead of “http://styzic.com/my/page”, just “/my/page”. Makes things like this much easier. But some of the settings Chris mentioned obviously can’t be relative.
Thanks a lot for your replies, now it seems like I’ll have more 1 or 2 days without ssl đ
4 …
good idea to read the WordPress docs/codex on setting up the wp-config.php file and optimizations, like removing the comments (!), and setting /paths/to/theme/folder explicitly on the server
see: – advanced options section
http://codex.wordpress.org/Editing_wp-config.php
define('WP_HOME', 'https://www.SITE.com');
define('WP_SITEURL', 'https://www.SITE.com');
define('TEMPLATEPATH', '/var/www/vhosts/SITE.com/httpdocs/wp-content/themes/Newspaper');
define('STYLESHEETPATH', '/var/www/vhosts/SITE.com/httpdocs/wp-content/themes/Newspaper');
define( 'FORCE_SSL_ADMIN', true );
adjust paths for your server …
anyway… that’s what I did đ
For 3)
use the phpmyadmin on server — or other tool to search the table for your posts, to replace http://yoursite.com/uploads/* with https://yoursite.com/uploads/* or similar. You will need to find other help on HOW to do that specifically, as I don’t have the proper instructions handy now. (sorry)
Chris, for option 3 I”ll do it manually because there are a lot of links to tags etc too.
I’ve a site that’s not too big so, it should take about an hour đ
THanks for writing, but of course before that, i’ll make a backup and try phpmyadmin and update via queries. đ
Again, for option 3, you should use the tool I linked to. Doing it manually or using phpMyAdmin’s interface for querying are both risky for changing URLs in WordPress.
Consider this quote from a post linked from the tool’s site:
“I canât emphasise enough that itâs important to handle serialised PHP correctly. If you donât, then settings will go missing, fields will get corrupted, and your site runs a severe chance of not working on the new location. Itâs a pain, but itâs important.”
Here you’re not technically moving to a “new location” but changing “http://…” to “https://…” carries the same risk, I believe. Chris can correct me if I’m wrong. đ
Well, in our case we were not changing anything except links to embedded images in the posts, so doing it on the server side after making clean backup, and editing only the post tables to search/replace the image location worked for us. Luckily in our case we never used the date based directories for images, and always change from /uploads/ to something like /images/ or /meta/ or /pix/ or whatever.
So simply changing embedded text within the post data worked fine, once we looked at an actual record in the database, copied the actual info in the dbase and search/replaced that by simply adding https vs http to the <img src="http://mysite/images/*
Obviously anybody who is going to edit their dbase file should VERY CAREFULLY research the risks, and make sure
1) backup of data from the WP admin panel
2) backup of dbase from the phpmyadmin or similar
3) possibly full snapshot backup as gzip file of entire website before doing anything at all
If the tool @TheMediumUTM is suggesting works 100%, then that would obviously be the way to go if it supports the wildcard search/replace within a specific data field.
I’ve just been doing it from the server side for almost 20 years, so always first go-to over using some plugin for WordPress, which I generally distrust to edit dbase files; and frankly not even sure our server would allow a plugin to touch the dbase unless this tool is actually simply global editing the posts as posts, vs actually doing dbase mods above the level of the site.
I guess it also depends on how many pages you have. If you have 10,000+ pages, then maybe doing it via phpadmin, and asking your hosting support to do that could be better.
I’ve not looked at that plugin, so have no actual opinion about it…. (and so why am I rambling on here on a Saturday morning anyway?)….. đ
@Shashank
if you’re doing it manually, obviously that works too!
Good thoughts. Note that the tool I linked to isn’t a plugin but a script you upload and run independently of (but designed for) WP. I believe I found it through the WP migration docs, which warned about changing URLs in a database when you migrate domains.
I know it’s notthing related to the theme, but how do I setup SSL?
I have done everything but not able to change to https
I tried changing the site url and home url in general settings but that creates a redirect loop đ
Just to ask, has anyone else tried SSL with this theme and succeeded?
Any tips guys on the redirect loop? I even tried disabling all plugins but in vane!
-
This reply was modified 11 years by
Shashank Shekhar.
@Shashank Shekhar there is ways to find out things and it’s called “Google search” all you have to do is search how to set up SSL with wordpress and trust me they will be a lot of links to guide you and help you too do that…
Other opition is cloudflare now giving FREE SSL away and they do all the set up for you and also guide you to set it up on ur server…so try using google search and you will find all ur answers man..
Steven if that was a joke, it was good, đ
Thanks your your suggestions anyway but I really can not get it done, and I have read upto 50 search results saying the same things that somehow doesn’t work for me đ
CloudFlare just active SSL on my site and i did not had too do nothing but fix a few things like “Non-SSL Elements” and i just get a plugin called “SSL Insecure Content Fixer” and it fix most of them…so my advice too you try clouldFlare and see how it goes for you…
Because CloudFlare is a proxy i had to add this too my “wp-config” to fix the Non-SSL Elements i was getting..i guess now mine working you can test for me..
if (isset($_SERVER[‘HTTP_X_FORWARDED_PROTO’]) && $_SERVER[‘HTTP_X_FORWARDED_PROTO’] == ‘https’)
$_SERVER[‘HTTPS’]=’on’;
I am also using cloudflare itself đ
But I have my wordpress installed from installatron and the url in it is http://www.styzic.com and I can’t change it to https because I don’t have a cert. on my server.
I created a self-signed cert. but still, should I remove the install from installatron?
If yes then how will I back up?
BTW, your site still has mixed content warning.
-
This reply was modified 11 years by
Shashank Shekhar.
Mine too is working https://www.styzic.com but when I force ssl, I get the loop!
Well with me i only want my front page use SSL not all over my site because google is now ranking sites with SSL,before they rank was about speed now they making it more personal i guess…and this is why clouldflare giving away SSL for FREE and doing all the work for you..you don’t have to play with ur WP install are url etc,as long ur site going through clouldflare servers they do it all for you…
I see the loop,it’s because you doing a redirect from http to https…may be it’s best you just leave https for the front page because that’s all google care about not every page on ur site..people that don’t sell things on there site are use credit cards etc don’t need SSL all over there site..
But I need it on whole site, because the posts pages are the pages that get the most visits and they should rank high.
