Author Topic: I want to move to another web hosting. What should I do?  (Read 22901 times)

Offline llegrand

  • Hero Member
  • *****
  • Posts: 1331
  • Karma: +338/-2
    • View Profile
Re: I want to move to another web hosting. What should I do?
« Reply #30 on: July 10, 2017, 07:04:45 PM »
don't drive off the Cliff ,  this is really not that difficult usually.

But I must apologize I am really short of time today as I have some eye surgery scheduled for tomorrow and a ton of work to still accomplish.
However,  I will have one of my coders see if you've gotten enough help or still need some when he comes back on shift in about 10 hrs.

Perhaps one of the AC devs will answer you ,  or my coder will get to you first thing when he is on shift.

« Last Edit: July 11, 2017, 06:01:23 AM by llegrand »

yonghan

  • Guest
Re: I want to move to another web hosting. What should I do?
« Reply #31 on: July 11, 2017, 07:34:19 AM »
Hi,

If i understand you correctly on the browse button/file upload. AFAIK that HTML file upload is not designed to look/browse server side data/folders. It is designed only to look/browse your computer.

Hope it makes clear enough about the default file upload.

Offline Geoffrey

  • Full Member
  • ***
  • Posts: 147
  • Karma: +26/-3
    • View Profile
Re: I want to move to another web hosting. What should I do?
« Reply #32 on: July 13, 2017, 03:25:04 PM »
More things that I have learned:

The AC backup app will do a database backup and store it as a sql folder, which can then be "Restored" by AC into your remote database system.  This is an important and valuable feature.   

The AC backup app doesn't do the same thing with the site files.  You have to choose compression, there are indicators in various places that compression can cause problems, and there's no provision in Restore for handling a compressed file.  Rather, you upload it and uncompress it and then try to point Restore at the parts you need. 

Bottom line: if you want to upload a site from a dev machine to a live server, I recommend that you ignore Backup and just ftp the site files straight up to the proper destination folder. 
To upload the database files, make a dev-machine Backup of Database only.  Then run Restore on the live server site, then point Restore at your local db backup, and click go. 

This is a pretty different process than you will find on most other cms frameworks.  I personally found it to be challenging and frustrating, but that's only because I've never encountered an issue uploading a site before, so maybe it's just me. 

Here are some details on the vagaries of uploading an AC site to A2 Hosting live server:

1.)   Use the Softaculous AbanteCart Installer. 
a.   Use the exact same Admin name, username, and password as when you set up your localhost Admin backend access url and credentials.
b.   Use the same database prefix as you used for phpmyadmin localhost site database.
c.   If it gives you the option, install AbanteCart without demo data.  I never saw that option.

2.)   Examine your live A2 cPanel database names, database user ID's, and related passwords.  Make a note of the A2 database name, user, password you intend to use for the live site. 

3.)   If you made any core edits on your dev site, you should have a list of them already.  Individually ftp those files up to the corresponding live folders in your new AC install, overwriting the original files.

4.)   From the dev root, FTP up your template extension folder, plus your resources and image folders and the handful of individual files on root (overwirte).

5.)   Check the privileges for the root/index.php and root/system/config.php files.  Should be 644, or rw-r-r. 

6.)   Edit the live root/system/config.php:
a.   Change the DB_Database name, Username, & Password to the values identified in Step 2-3 above. 
b.   Change the Server_Name value to your full live url. 
c.   Save.

7.)   Navigate to your live backend site address.  It should come up.  If it doesn't, in A2 cPanel, scroll the Scripts bar until you see AbanteCart icon.  Click it. Click the pencil Edit button.  Make sure that the specified database name, user, and password match the trio of names identified above. 

8.)   Once the backend is up, go to System>Settings>Store Details - make sure the Store URL and Secure Store URL are set correctly.
 
9.)   Run the live site. 

SSL:
1.)   A2 Hosting - Make sure an SSL certificate is applied to the domain.  Various free options are available.  One is already in place by default with A2.  Use your own if you have one.

2.)   Live Backend: Go to System>Settings>Store Details - make sure BOTH the Store URL and Secure Store URL are set to https:// .  This is just a weird little characteristic with AbanteCart.  No rhyme or reason to it.  Counterintuitive.  If you don't do this step, your site Home button will take you to a broken homepage.

3.)   In file editor, open /system/config.php, change Server_Name value to https://...

4.)   In /htaccess, add the following three lines to redirect all traffic to https route:
a.   RewriteCond %{SERVER_PORT} 80
b.   RewriteRule ^(.*)$ https://www.example.com/$1 [R=301,L]
If you don't do this, anyone who punches your any-non-https url into any search will go to your non-secure site.  My own home button took me to my non https homepage, where a handful of images were broke.  etc

I love the last bit.  A lot of this stuff is absent or obscurely buried in the Docs, but step 4 above is from outer space.  No mention of it anywhere, even though AC gives you a preset htaccess file.  Quite a rodeo!

Soo, if it weren't for a minimum of 4 years of activity on this forum by llegrand, most of the information I used to wrest a functional site from AC would be absent, and i would have abandoned the framework long ago.  Thanks bud.

Offline Basara

  • Administrator
  • Hero Member
  • *****
  • Posts: 3564
  • Karma: +175/-0
    • View Profile
Re: I want to move to another web hosting. What should I do?
« Reply #33 on: July 14, 2017, 01:38:07 AM »
Thank you Geoffrey  :)


Can you please explain what "Home button will take you to a broken homepage"?
Setting up both store urls to https is not recommended but of course allowed.
SSL:
2.)   Live Backend: Go to System>Settings>Store Details - make sure BOTH the Store URL and Secure Store URL are set to https:// .  This is just a weird little characteristic with AbanteCart.  No rhyme or reason to it.  Counterintuitive.  If you don't do this step, your site Home button will take you to a broken homepage.



I think you should Not edit config.php to setup SSL. What Server value your have before?
There usually something like
Code: [Select]
define('SERVER_NAME', 'localhost');

3.)   In file editor, open /system/config.php, change Server_Name value to https://...

“Chuck Norris is so amazing.”
― Mother Teresa

Offline Geoffrey

  • Full Member
  • ***
  • Posts: 147
  • Karma: +26/-3
    • View Profile
Re: I want to move to another web hosting. What should I do?
« Reply #34 on: September 02, 2017, 03:31:43 PM »
Thank you Geoffrey  :)
Can you please explain what "Home button will take you to a broken homepage"?
Setting up both store urls to https is not recommended but of course allowed.

Yes I can.  AC documentation is lacking in specificity and intuitive workflow.  A simple and comprehensive tutorial for establishing an https site does not exist.

In the absence of adequate documentation, I read what was available and then I researched the forum.  I found multiple instances of a recommendation for setting both store urls to https as a solution to my observed problem of navigating to my https site, then navigating to a product page, then clicking the home button which then took me to a non-https homepage that had two problems: it was non-https (which I guess is becoming obsolete), and it was broken, meaning that images did not show and the layout was jumbled.  The only solution i found for this problem was setting both urls to https. 

What do you mean by 'not recommended'?
What does that mean? 
Why is it not recommended? 
What is the harm of doing it? 
What is the alternative to doing it? 
What other approach should i be taking? 
What are the steps necessary to achieve the alternative approach?  All of the steps please. 

I think you should Not edit config.php to setup SSL. What Server value your have before?

Why not?  What is the reason that I should not do this? 
Is there a harm associated with this approach?
Why do you say that I should not do this?

Nothing else worked. 
I read and researched. 
This is what I came up with. 
The 1st line in my config.php was this:
define('SERVER_NAME', 'www.sitename.com');
I changed it to this:
define('SERVER_NAME', 'https://www.sitename.com');

It worked.  It has worked for over a month now.
Why should I not do this?
What is the harm?
What should I do instead?
Why should i do it instead?
What are the exact steps of what i should do instead? 
 
It is not helpful to have an AC developer tell me that I should not do this when the AC documentation does not tell me what I should do, and also when the developer does not explain anything.   


 

Maternity Dress