Jump to content

How best deploy from localhost to live server?


Recommended Posts

My shop is nearing completion on my local server.
Soon it will be time to transfer it to the live server for finishing touches.

Obviously, all pathes and database credentials will be different there.
While it's now installed at c:\wamp\www\client\shop it will later be something like /home/.sites/123/site123456/web
And the URL changes from http://localhost/client/shop to https://www.client.at/shop

I found a backup-section in the Admin.

If I first install the shop on the live server and then restore from my local backups. Will it work, or will some of the information replace the new and correct pathes and all?

Or how else to do it?

In the future there will be frequent changes, that I first have to test locally and then update the live server.
I really hope, there's an easy way for this.

Cheers 

Link to post
Share on other sites

rework global configuration file found in /includes/ with your new database details.

setup/restore database to new location.

upload all files.

adjust permissions of uploaded files. as a basic test, you can validate those permissions by uploading the latest setup directory from the installer and validate they all report OK. 

 

test... :)

  • Like 2
Link to post
Share on other sites

Slight problem.

I did as described above and doublechecked the new database settings.

But the frontend and the admin both give me:

Quote

Notice: `name` is not allowed as a key in 'CubeCart_config' table! in /home/.sites/123/site123456/web/shop/classes/db/database.class.php on line 960

Even more strange, when I uploaded the setup-directory to check the file permissions (everything ok), it told me that I had Version 3 and I better upgrade to 6.4.2 (which my original upload was).
Out of curiosity I let it run, took a while but nothing seems to have changed.
Setup now says it's 6.4.2, file permissions are still ok, but still the same error message.

I googled and found others with this problem, but no solution that worked.

Ideas?

Link to post
Share on other sites

That problem is the default message when Cubecart is having problems finding the database.

CubeCart can probably communicate with the database server (but double-check that), but maybe the database table names are not right.

Here is the critical part of using Windows (and I should have thought of this when you mentioned WAMP):

MySQL under Windows will create database table names in lowercase (cubecart_inventory), and when Cubecart asks for CubeCart_inventory, Windows says, "Meh! uppercase - lowercase? Same thing."

While under Linux, uppercase and lowercase are two different letters.

So, go through the database as it sits on the Linux box and verify that all the table names have CubeCart and not cubecart or Cubecart.

 

 

Edited by bsmither
Link to post
Share on other sites
20 hours ago, bsmither said:

MySQL under Windows will create database table names in lowercase (cubecart_inventory), and when Cubecart asks for CubeCart_inventory, Windows says, "Meh! uppercase - lowercase? Same thing."

While under Linux, uppercase and lowercase are two different letters.

You saved me again, this was definitely the reason. I thought I was smart and used search/replace to change my exported SQL to cc_CubeCart_ instead of cc_cubecart_, but somehow managed to mess everything up in the process.

In the end, I went another route and installed CC freshly on the live server without any problems. Changing language, skin and activating the extensions was a matter of minutes and now it works online. Im looking forward if it will work the other way then, when I copy it back to my WAMP, but we'll see.

 

17 hours ago, Tony said:

I had this *exact* issue when I exported the database via the Cubecart admin and then importing it elsewhere. When I exported it using phpMyadmin and then imported it, it works fine.

Interestingly, I DID export and import via PHPmyAdmin, but it did not work at all. Maybe I should try store backup to see if it works in my case.

Link to post
Share on other sites

I honestly do not understand why so many people use a local WAMP based system in situations like this - while WAMP *mostly* works, it isnt officially supported and there are always annoying issues like this.  If you have a Linux hosting account, why not simply create a sub-domain dev.your-domain.com, install CubeCart in there and put the store into maintenance mode.  That way you can develop and test in exactly the same environment as your live store, not have all of these hassles and be able to copy files and even data if needed, easily between dev and live stores

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...