Jump to content

Change URL domain name of the website


Recommended Posts

Good evening everybody  :)


 


Here is my problem, i want to move my prestashop website from the FTP client to my local machine for testing purposes, however all the links of the moved website stay unchanged withe the domain name site.com instead of site.dev


 


Is there any way to replace the old domain name by the new one that i've specified in the host file ? (Meaning instead of having site.com/index.php i'll will have site.dev/index.php)


 


Is a such thing possible ? Any help will be welcome and much appreaciated ;)


 


Thanks in advance :)


 


Link to comment
Share on other sites

First of all a deep thanks to you for your reply :)

 

That been said, i'd like to tell you that i haven't updated my files, the website was never there on my local machine i just placed the main folder for the first time from my FTP right to my disk and imported the database that's it, what do you mean by "install locally" ? Can you be more specific please 

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

Unless I'm reading your post incorrectly.  I believe you're saying you want to create an offline version of your shop.

So instead of downloading everything, just install prestashop on your pc (local machine) then change the  theme, edited files.

Link to comment
Share on other sites

Yes that's what i want an offline version of my shop where i can test things on it before i upload them to the FTP.

 

Your idea intrest me and i wanna try it, i hear what your saying and it could work, i installed prestashop on my pc and created the same databases data of the existing online shop all went well, except when i try to install the theme i took the folder of the theme from the original shop directory (Themes) and placed it on themes of the new installed shop on my local server.

 

However, this manual installation doesn't work at all for me, i tried also to install it by compressing it and importing the theme under the zip format but it returns to me an error message which is : Bad configuration file

 

Do you have any idea how to install the theme ?

 

 

Thank you very much in advance for your help :)

Link to comment
Share on other sites

don't over think this, it is not complicated

 

take a copy of your production site (web content and database) and install them both locally.

now edit your local settings file (in config folder) to point to your local database (server, db name, username, password etc...)

 

now log into your local back office, go to SEO page and change the domain name to localhost.  clear any cache and then open your local front office.  things should be working properly.

Link to comment
Share on other sites

You think it's that simple, what your proposing me now is the first step i've done and when it didn't work i came asking for help in your forum ! (I cleared the cache and i change the domaine name directly from the database ps_shop_url which is equivalent to doing it from SEO section)

 

That been said, i did install the website localy with his database changed the configuration setting file to point to the local database and it worked, to change the domaine name i must first be able to connect to the backoffice which i can't since he gives me an error page if you have read on top !

 

Basicly to change the domaine name i went to the ps_shop_url table and changed the domain name and to the configuration table aswell, and went back to my local website and i could then display the home page but the current problem is this : when i try to go to another link another page beside the home page it gives me an error saying : The asked link could not be found on this server (error 404)

 

Since installing the website didn't work and i got no further advices, i thought i'd try the promissing idea of Mr Keir which i thought it would be simple, but turns out i face problems with it too :(

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

first, this is not my website.  second I am offering you help, probably better not to get angry or pissy with me

 

you can log into the back office without having to change your domain.  the reason you go to SEO and change the domain is because it forces your .htaccess and mod-rewrite rules to be recreated.  just updating the database does not.

 

you must also clear the smarty cache since they contain old references that would not work locally, doing that from the back office is also simple.

 

lastly, no where in any of your posts do you say you received an error when trying to log into the local back office. 

  • Like 1
Link to comment
Share on other sites

@Bellini13

 

I didn't mean to get angry and i wasn't and if it seemed that way to you, i apologize.

 

However i appreciate your help and all others help, that been said,  i want to mention that i got the problem fixed by a weird way i don't understand why and where but you must know better than i do, all i had to do is to turn off and on the url rewriting from the SEO section (URL Simplifying) and it magicly worked after that :D

 

There is still some smarty cache problems i get some errors of cache instead of some products attributes that has to be shown, but the main problem is solved and i'll deal with the other problem later on. 

 

Thank you all for your help and time to walk through my issue, during this process you've adviced me a lot about a lot of things which i won't forget and might help me in the future.

 

And finaly, i apologize again to you Bellini13 it was never my attention to disrespect you but what you've said let me rethink my way of writing sometimes and it can be viewed differently, i'll be more attentive with my writing style :)

 

See you all :)

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