Jump to content

Moved server - now customers and admin can't log in.


Recommended Posts

Hi. I relocated my shop to a new server following the instructions posted in this forum.

The problem I now face is that when I try to log in as a customer (I have created an account on the old server) I get an
authentication error and can't log in, so I can only assume that all customers in my databse will have the same problem.

Also, I am unable to log into the admin/back office end of things as I am told 'employee does not exist, or bad password'

I have re-imported the database from the old server and still i am getting these errors - Any ideas on what I may have missed?

Any help would be appreciated.

Thanks!

Link to comment
Share on other sites

  • 1 year later...

This is how I migrate and I've never had a problem.

 

1) Take a Zip file backup of all the files on your existing site.

2) Export the database of your existing site into an SQL file.

3) Go to your new site, import and open up the zip file.

4) Create a new MYSQL database (most web hosts will have a MYSQL Wizard in CPanel to walk you through this)

5) In your newly created site find the file "settings.inc.php" [i think it was in a folder called "config". You might need to check]

6) Download the "settings.inc.php" file and update the information so that it contains the name of your newly created database from step 4, the name of the database user and the password. Save the file and upload it back to the new site, overriding the existing settings file of course.

7) Now the important part. Open up the new database and import the sql file from step 2 into it. Then find the "ps_configuration" table.

You need to manually amend the database record values for PS_SHOP_DOMAIN and PS_SHOP_DOMAIN_SSL and possible PS_BASE_URI if you have been hosting in a development subdomain. Just make sure all the new values reflect your new domain and/or subdirectory.

8) Almost there. Find the .htaccess file in your new site and change the permissions to 777. Not sure if this is strictly necessary. Some people say to do it. After you have finished you should change back to 644 I think.

9) Now. You MAY have to type the login url directly into your browser, something like www.mynewdomain.com/admin . Then enter the same username/password combination you have always used to enter the site.

10) In the admin section go to Tools / Generators and regenerate your .htaccess file. I believe this recreates your new friendly urls and overides any old urls.

 

You should be golden !

 

One gotcha I had was that when I typed in the url of the new homepage into my Firefox browser it kept getting directed back to my old site.

To fix this I opened up the browser preferences and deleted any cookies relating to the old site. Then it worked fine. Just beware of that.

 

In later versions of Firefox if you are STILL having redirect issues, it may

be worth making sure the DNS Cache is flushed.

 

Firefox has some notorious "features" designed for greater browsing speed such as storing information about files on a given site.

I had this trouble with a PrestaShop move and it was simply a case of flushing the DNS cache for that domain on my Firefox browser.

 

You can learn more about the issue here:

http://tycoontalk.freelancer.com/web-hosting-forum/234437-how-clear-dns-cache-firefox-10-a.html

 

Another potential "gotcha" not adequately highlighted in point 6 above.

 

The first line of your settings.inc.php file could look something like this if your shop is situated in a development subdirectory

 

 

Quote: define('__PS_BASE_URI__', '/mysite5/');

When changing subdirectories be sure to update this part or

you will get an infinite Prestashop login loop.

  • Like 1
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...