Jump to content

From Localhost to Online


Recommended Posts

I've set up a complete prestashop with themes, products... on my hard disk (Localhost)

 

Now I want to go Online!

 

But when uploading the files to my server I have problems viewing it.

 

Some files cannot be uploaded (fatal error). Are they in use by my Localhost (xammp)?

 

How can I put my complete prestashop (including product catalogue, descriptions, images) online?

  • Like 1
Link to comment
Share on other sites

you could try to create a new database, and import the data from your localhost database. then in the config setting file, you can change the database information to use the new one.

 

it should work, assuming what you did on the clean install mimics what you did on the localhost install

Link to comment
Share on other sites

existing server:

  • using phpmyadmin on your localhost export your production database

----

  • you will need to create a new db name/userid/passowrd on the new server
  • with phpmyadmin import your production database
  • you will need ftp credentials for new server, upload your complete site to the new server.
  • modify config/settings.inc.php with new db name (if changed), db userid (if changed) and db password (again if changed) and upload to your config.settings.inc.php
  • now navigate to your back office-->preferences-->seo's and urls and change:

Shop domain name
Shop domain name SSL
to www.yoururl.com (note if you use test domain, then put your test domain name here, and will need to change this again when you cutover to your production url)
  • You should now be able to naviagate to your front office.

- if you use friendly urls, then make sure that you carry over your .htaccess file, this is typcially hidden. Most ftp programs allow you to set 'view hidden files'. Look for this when you download your oritinay site.

 

 

-there can be snags, the thing that most often trips people up is:

  • permissions (but typically the ftp program will create the same permissons)
  • new remote server is not configured properly for PrestaShop. You can test this by downloading a fresh ps installtion and installing per these instructions. The installatioin process will check that important server support is installed. This is worth the effort because debugging an ftp'ed site whose server doesn't have some key function can be VERY time consuming not even mentioning the frustatrion.

  • Like 1
Link to comment
Share on other sites

  • 10 months later...

existing server:

  • using phpmyadmin on your localhost export your production database

----

  • you will need to create a new db name/userid/passowrd on the new server
  • with phpmyadmin import your production database
  • you will need ftp credentials for new server, upload your complete site to the new server.
  • modify config/settings.inc.php with new db name (if changed), db userid (if changed) and db password (again if changed) and upload to your config.settings.inc.php
  • now navigate to your back office-->preferences-->seo's and urls and change:

Shop domain name

Shop domain name SSL

to www.yoururl.com (note if you use test domain, then put your test domain name here, and will need to change this again when you cutover to your production url)
  • You should now be able to naviagate to your front office.

- if you use friendly urls, then make sure that you carry over your .htaccess file, this is typcially hidden. Most ftp programs allow you to set 'view hidden files'. Look for this when you download your oritinay site.

 

Hi, Elpatron and everyone.

I installed and configured Prestashop 1.5.2 on localhost, did all the work that takes much longer to do on the server and uploaded the files, database and edited the config info. I can enter the admin panel login page, but when I enter the password, the page just reloads. The login and password is definitely correct, I even changed it just in case. Do you know what the problem might be?

Can you tell me which permissions should be set for which folders? What else is there that could be done to make this work?

Link to comment
Share on other sites

Hi, Elpatron and everyone.

I installed and configured Prestashop 1.5.2 on localhost, did all the work that takes much longer to do on the server and uploaded the files, database and edited the config info. I can enter the admin panel login page, but when I enter the password, the page just reloads. The login and password is definitely correct, I even changed it just in case. Do you know what the problem might be?

Can you tell me which permissions should be set for which folders? What else is there that could be done to make this work?

 

The post I made was for a 1.4 shop...I just tried something similar with 1.5....I was only partially successful due to permissions.

 

Whether 1.4 or 1.5, one should do the native ps installation on their remote server to see what if anything is different than say their localhost on the pc or another server they are moving from. When I did this after trying to move a site...I found around 20 folders with permission problems...

 

i.e. doing a test native installation on your new server will tell you what permissions or other issues you might have there.

Edited by elpatron (see edit history)
Link to comment
Share on other sites

The problem wasn't in the permissions. I did a fresh test installation on the server and all the permissions were the same as in the files uploaded from localhost. After quite a while spent I figured out that the solution was in fact very simple.

What you have to do is just change the directories and shop name and path settings in the SQL dump from localhost before importing it to the database online, without entering the admin page as elpatron suggested. You can easily change those settings in the SQL file before uploading it...

If anyone has any questions or needs help with uploading a shop configured on localhost to an online server PM me.

  • Like 2
Link to comment
Share on other sites

  • 2 weeks later...

elpatron & mr.beetroot have solved it for me. Thanks guys!

 

@elpatron: permissions did trip me up a bit, but that’s not specific to the 1.5 release. Anyway, it seems that in my case, the permissions weren’t the problem.

@mr.beetroot: your version of editing the sql-dump prior to importing is great and pointed me to the further step that has not been addressed in other posts (it can be quite tricky editing the large dump with a text-editor for example).

 

Using your database editor of choice (e.g. phpMyAdmin) find the ps_shop_url table and change

 

domain: to newserver

domain_ssl: to newserver

physical_uri: to “/” if your shop is in root or “/newshop/” if it is in a sub-directory

 

This step allowed me to access my shop at the new domain, both front- and back-end.

 

One caveat that I have to solve remains: it seems that some templates (not sure if the default does the same?) have image links in the database. These links point to the location in which they were added – the domain name is part of the path – and have to be edited to ensure that this works too. Perhaps editing the sql-dump to remove all the old paths this would be solved, so we’re back to mr.beetroot’s version for this!

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...