Update local copy and then transfer to live server
I'm running an e-commerce website, selling academic solutions. My team has to upload questions and solutions on the website. The solutions are uploaded through FTP but questions are uploaded as new product(one question as one new product). The process of uploading questions take lot of time because of the internet speed and shared server.
My question is that if it is possible to upload all the questions in local computer(local copy of zencart installed) and then just upload the database file to the live server.
Will that work fine if not then please give me any suitable solution so that we can upload large number of questions daily.
Thanks
Re: Update local copy and then transfer to live server
You would have to ensure that you upload all the linked database tables at the same time. So if you're creating the FAQs as products, you would probably need to upload both the products and products_description tables, as well as any others that are affected. But yes, the basic method is feasible.
Re: Update local copy and then transfer to live server
Isn't it feasible if i just upload the .sql file to the live server database, once we add all new products on the local computer?
Re: Update local copy and then transfer to live server
That would depend what "the .sql file" is and how you upload it. I'm afraid your question is too vague to provide a helpful response.
Re: Update local copy and then transfer to live server
Let me explain you this way:
I'm going to get the .sql file from my live server and going to transfer to my local zencart installed database.
This way i'll have the same copy on both live server and local computer.
Next my team will add new questions (as new products) on the local computer and also add the attributes for each question. So in other way for each question we are adding new product and its attribute in the database.
Finally i'll transfer the .sql file from my local computer to the live server.
Is it possible?
Re: Update local copy and then transfer to live server
But you're still not explaining what the sql file is, how you're generating it or what it contains.
If it's a full backup of your system, (through the mysql backup facility) then restoring from your local computer would result in you losing everything that has happened since you took the original backup on your site, e.g. orders.
On the other hand if it's a selective backup of tables that won't have changed on the site and you pick up all the linked tables affected, you may be OK.
Though if it's a selective backup but doesn't include drop table statements, then you will probably just get errors.
And just uploading or transfering the sql file wouldn't be enough, you would need to execute it.
Re: Update local copy and then transfer to live server
Yes, you are right i was planning to get the full system back from back database facility available at my hosting server.
You are also right that in this way i'll lose all the new orders details since i would take the back of entire system database.
Now you should suggest me what should we do if we just need to add new products and its attributes to the database on local computer and finally upload them on the live server.
How can we take partial database like just the products details and its attributes?
Re: Update local copy and then transfer to live server
If your webhost offers phpMyAdmin as part of your hosting package, then I believe that you can export sql backups of selected tables.
You would then import the resulting sql to restore the data in those tables.
Re: Update local copy and then transfer to live server
Thank you so much for your awesome help. I'll let you know if i do anything wrong. :)
Re: Update local copy and then transfer to live server
Good luck.
Don't forget rule 1 - take a full backup of your live site before applying the sql for the local computer changes.
(And post back here if you do have any problems) :smile: