Jump to content

change domain name of the shop?


Recommended Posts

you must be more specific in what you want to do...

 

for example, you have www.mysite.com/backup and want to change to www.mysite.com or www.mysite.com/shop?

 

or you want to change from www.mysite.com to www.anothersite.com?

Link to comment
Share on other sites

if you can't access admin panel

connect phpmyadmin

select ps_configuration table and chance

PS_SHOP_DOMAIN

PS_SHOP_DOMAIN_SSL

value

 

Yes, that is what i need to do, since I changed from www.domain1.com to www.domain2.com, I can't access the admin anymore after the move, until i change it first before pack and backup the currenty store.

 

any other table need to take care of ? thanks

Link to comment
Share on other sites

Yes, that is what i need to do, since I changed from www.domain1.com to www.domain2.com, I can't access the admin anymore after the move, until i change it first before pack and backup the currenty store.

 

any other table need to take care of ? thanks

 

If that was your problem why didn't you tell that in your topic in first place :huh:

 

Try to be more specifi when you put your questions ;)

  • Like 1
Link to comment
Share on other sites

Yes, that is what i need to do, since I changed from www.domain1.com to www.domain2.com, I can't access the admin anymore after the move, until i change it first before pack and backup the currenty store.

 

any other table need to take care of ? thanks

no needed chance other table. i working many times for this . i creating sites on localhost and after move internet.

step one

/config/setting.inc.php chance datababase details

step two

chance domain name on phpmyadmin

working me many times

Link to comment
Share on other sites

the back office doesn't use these fields, i.e. if you can't get into the back office, then you have other problems...

i think you can't access admin panel

sample www.domain.com chance www.domain1.com

try www.domain1.com/admin auto redirect www.domain.com/admin.

Link to comment
Share on other sites

Let me be more clear about the back office not using the mysql db shop domain name, the back office uses the getHttpHost function in tools. In other words you can use any url that is pointed to your domain to access your admin.

 

if the original poster would like to tell us exactly what they mean by not being able to access their back office, it would make it much easier for someone to help resolve.

 

please make sure to clear your browse cache/cookies...as your browser will want to go to you old domain.

Link to comment
Share on other sites

Let me be more clear about the back office not using the mysql db shop domain name, the back office uses the getHttpHost function in tools. In other words you can use any url that is pointed to your domain to access your admin.

 

if the original poster would like to tell us exactly what they mean by not being able to access their back office, it would make it much easier for someone to help resolve.

 

please make sure to clear your browse cache/cookies...as your browser will want to go to you old domain.

you're right friend;

i sayed if not chance domain name on before start moving . you have to chance domain name on phpmyadmin

Link to comment
Share on other sites

First , thanks for all your replies, Sorry not saying clearly enough at the beginning of the topic.

 

Here is what I want to do

 

Move the shop from one domain name to a completely different domain name.

 

Here are what I plan to do.

 

1. backup the sql table

2. backup all folders related to the shop

 

3. setup table on the name domain

4. import the SQL data back to the name domain

5 move all the folders to the new domain and keep all the folders structure exactly the same.

6. change the /config/setting.inc.php to the new database details

7. go to phpadmin to change the select ps_configuration table and change the PS_SHOP_DOMAIN, PS_SHOP_DOMAIN_SSL value for the new URL

 

Now what else i need to do, of course I need to access the admn panel? but don't quite get what elpatron comment below?

 

"Let me be more clear about the back office not using the mysql db shop domain name, the back office uses the getHttpHost function in tools. In other words you can use any url that is pointed to your domain to access your admin.

"

 

Thank a lot!!!!

  • Like 1
Link to comment
Share on other sites

  • 2 weeks later...

Sorry about jumping into someone elses topic but I have a similar problem.

 

I developed the site on a temporary url on the server (an IP address/folder name)

I've now pointed a domain name at it, altered the two tables with the domain name instead of the ip address

Altered the config file by removing the ip/folder name and inserting the domain name.

 

The database is the same, nothing changed there, the files and database are in the same location; the only different is that I'm trying to access it via the domain name instead of the ip/folder_name path

 

 

 

Now I'm getting this error

 

Internal Server Error

The server encountered an internal error or misconfiguration and was unable to complete your request.

 

 

I was wondering if I'd missed something?

Link to comment
Share on other sites

Altered the config file by removing the ip/folder name and inserting the domain name.

 

by config file I am guessing you mean setting.inc.php..if so then __PS_BASE_URI__ would point to your folder and not contain your domain name...probably would be exactly what it was before you modified it...if root then '/'.

Link to comment
Share on other sites

Eventually sorted it.

 

I'd already put / in the __PS_BASE_URI__ but it still wasn't working. Then later on in the afternoon it started working on a different computer, but not the original one. Today it works on both.The only thing I can put this down to is either the computer/network caching something even though I cleared the history, or perhaps the DNS on the domain name took a while to kick in.

 

Following that was another error about ID being missing every time I clicked on a category. Solved this by removing the domain name from the SSL part, leaving it blank

Link to comment
Share on other sites

  • 7 months later...

STEPS TO CHANGING DOMAIN NAME AND CHANGING SERVER .....

 

WHERE TO LOOK OR WHERE MUST IT BE CHANGED?

 

Ok ... Find and Replace in all the areas below...

 

 

Get the database file via phpmyadmin and F and R (find and replace) domain name.

Find old domain name and replace with the new

 

Go to your settings file in /config change it there

 

Change database connection settings if you change server and they probably are going to change.

 

ALWAYS SET CACHE TO "0" DO NOT CACHE UNTIL YOU ARE ABLE TO LOG IN. THIS FIXES MORE MOVING PROBLEMS THAN YOU CAN IMAGINE.

 

You will not be able to log in to admin. On windows go to start/run flush/ dns clear all your cookies and all of your history and get a email sent with new password.

 

If you are lucky the above will work the first time. :) That is all you need to change though. I thought I would save some people some time with the tips that I learned the hard way. I have moved several sites and changed several site names.

Link to comment
Share on other sites

Eventually sorted it.

 

I'd already put / in the __PS_BASE_URI__ but it still wasn't working. Then later on in the afternoon it started working on a different computer, but not the original one. Today it works on both.The only thing I can put this down to is either the computer/network caching something even though I cleared the history, or perhaps the DNS on the domain name took a while to kick in.

 

Following that was another error about ID being missing every time I clicked on a category. Solved this by removing the domain name from the SSL part, leaving it blank

 

i cannot locate __PS_BASE_URI__ in my config/settings.inc.php file.why is that so?

Link to comment
Share on other sites

  • 10 months later...

Just moved to new domain and I would like to add some more steps here:

  1. Check owner and permissions on new site. this can be root/other user due to unpacking archive/copying folder;
  2. Empty smarty compile folder (/cache/smarty/compile). Even cache was disabled this folder contained compiled templates which cause server error on template compilation.
  3. Generate new .htaccess. Most sites use friendly URLs and you have to generate new .htaccess with new domain name.
  4. chipslay mentioned to replace old domain in sql dump. So if you skipped this step, your content may have links to old domain (for example, in image urls as was for me). If you don't change server and you same database, just check SQL dump to be sure.
Link to comment
Share on other sites

  • 1 year later...

ok.. mine is similar with issues discussed here..

 

so the steps are:-

 

1) change info in phpmyadmin

2) change info in /config/setting.inc.php

3) delete .htaccess and then, re-generate in Back Office

 

only these, right?

 

is there any other step?

 

do we have to disable shop first? just like what we have to do in restoring the backup..

 

thanks

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

  • 2 weeks later...

Hi all,

 

Sorry to write in this thread but my question is very similar: I want to migrate my custom coded store to PrestaShop. What would be the best way to setup the new website while the old one is still up? My idea is to install PrestaShop in a folder www.mydomain.com/newshop and once it s ready to move it to www.mydomain.com. Would this be the best way and are there any specifics I need to know in advance?

 

Thanks,

Daniel

Link to comment
Share on other sites

  • 11 months later...

Hi, 

i would like to clarify on this old topic as i need to change from www.olddomain.com to www.anothersite.com

Anothersite.com is an addon domain and the name server is on another host, pointed to the ip of the shop site.

 

Do i need to create a new database?
I have my testshop built under olddomain.com/x/x. I would like to keep it for testing but the new shop should be reached from anothersite.com (without /x/x).

as i understood 

1. create a new database, backup the old

 

2. move all files copy to root: /public_html/

 

3. 
step one

/config/settings.inc.php file and change
define('__PS_BASE_URI__', '/x/x/');
to
define('__PS_BASE_URI__', '/');
step two

change datababase details
step three
chance domain name on phpmyadmin
 

 

4. select ps_configuration table and change

PS_SHOP_DOMAIN
PS_SHOP_DOMAIN_SSL

to anothersite.com

 

 

5. now i can login to backoffice...on anothersite.com/sameIDasold..?  clear your browse cache/cookies

6. import the database. What will i loose here? Friendly urls? Logins will work for my customers? 

7. Log in to my backoffice and go to Preferences>SEO & URL's to adjust your shop accordinly.

 

 
Please clarify if its ok!!
 
 
--------------------------------------------
 
If i do not want to change the database, just changing olddomain to anothersite
 
1. change the existing database name to anothersite in PS_SHOP_DOMAIN and PS_SHOP_DOMAIN_SSL
2. no need to setting.inc.php where the database can be found if it is in the root
3.define('__PS_BASE_URI__', '/')
 
Please clarify if its ok!!
 
 

 

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...