Textpattern CMS support forum

You are not logged in. Register | Login | Help

#11 2019-02-24 21:07:45

jakob
Admin
From: Germany
Registered: 2005-01-20
Posts: 3,388
Website

Re: documentation on moving to new server

bici wrote #316709:

define('PROTOCOL', 'https://');
should I ?

The define('PROTOCOL', 'https://'); means that Textpattern tags output https instead of http in the source code.

which i add to the end of the htaccess that comes with the Texttpattern distribution

Having a redirect in your htaccess is a good idea, particularly if the site existed previously without an SSL certificate. It also works even if you don’t have define(…); in config.php because it redirects all the links from http to https.

That said, I think you might have some errors in yours (the bit you posted looks like a redirect to www. when https is already active). I also put mine before the textpattern redirects, the logic being links get rewritten to https:// (and www. if also desired) first and then passed to Textpattern for processing.

I generally use the https rewrite code from html5boilerplate. Note the extra line(s) to allow .well-known (used by LetsEncrypt) and others to still be accessible via http.

That file also have some good variants for redirect to www or suppress www (note, for those you must include the env:proto bit at the top, or else edit your rules).

before i upload my old mysql file to teh new SQLDB i edit to change any server specific strings. then import into the new DB and it usually works fine

If you edit the dump of the old database to match your new paths before uploading, that should be fine. Your Admin prefs should then show as being correct.


TXP Builders – finely-crafted code, design and txp

Offline

#12 2019-02-24 21:16:43

jakob
Admin
From: Germany
Registered: 2005-01-20
Posts: 3,388
Website

Re: documentation on moving to new server

bici wrote #316711:

I finally chose to use A2Hosting.com in spite of having to use CPANEL. ugh! But I only use cPanel infrequently as i have good ssh access and i will set cron jobs to do backups and to deploy the backups to my Strongspace file space.

PS. very disappointed that there is no equivalent webfaction replacement. i think all the independents are being swallowed up by the big utilities. It feels like i have gone from a hip urban locale to the “bland sub-burbs”.

I’ve not yet moved over any clients from wbfaction but as I was looking for a UK-based host, I’ve been testing guru.co.uk. It’s also Cpanel (the newer variant) but like you say SSH-access is permitted and works for remote MySQL access, direct sftp etc. just fine. They have an email migration setup too, but I’ve yet to test that.

I was tempted to try out a cloud vps like webdock.io or upcloud.com (similar to digitalocean and co but european), perhaps in conjunction with runcloud.io as the admin area, but none of those options include email and finding a (non-google, non-microsoft, non-yahoo) alternative for just the 20+ email address quickly added up to much higher costs than a shared host that includes both.


TXP Builders – finely-crafted code, design and txp

Offline

#13 2019-02-24 23:14:14

bici
Member
From: vancouver
Registered: 2004-02-24
Posts: 1,437
Website

Re: documentation on moving to new server

jakob wrote #316713:

I’ve not yet moved over any clients from wbfaction but as I was looking for a UK-based host, I’ve been testing guru.co.uk. It’s also Cpanel (the newer variant) but like you say SSH-access is permitted and works for remote MySQL access, direct sftp etc. just fine. They have an email migration setup too, but I’ve yet to test that.

oooh. i do like the look of Guru! Do they provide free Lets Encrypt ? they say “free SSLCertificates”. I assume it is lets encrypt? Even with the added on email module its comes in at £10 per month. Something to keep in mind if A2H proves too staid ;-)


…. texted postive

Offline

#14 2019-02-25 05:01:58

bici
Member
From: vancouver
Registered: 2004-02-24
Posts: 1,437
Website

Re: documentation on moving to new server

so this line goes as is into confiq.php?

define('PROTOCOL', 'https://');


…. texted postive

Offline

#15 2019-02-25 20:36:59

jakob
Admin
From: Germany
Registered: 2005-01-20
Posts: 3,388
Website

Re: documentation on moving to new server

bici wrote #316715:

so this line goes as is into confi*g*.php?

define('PROTOCOL', 'https://');

Yep ;-)

To qualify that: it will make Textpattern put https:// (instead of http://) in all links generated by textpattern tags. It can’t correct links you have written manually in code. You need to change that yourself. Likewise it doesn’t change the protocol of links you set under Content › Links. You need to do that manually too (which is a good thing as not all sites have moved over).

Also, if you have a caching plugin, clear the cache first.


TXP Builders – finely-crafted code, design and txp

Offline

#16 2019-02-27 16:16:56

bici
Member
From: vancouver
Registered: 2004-02-24
Posts: 1,437
Website

Re: documentation on moving to new server

Done. And working as far as I can tell


…. texted postive

Offline

Board footer

Powered by FluxBB