kuba2 Posted January 11, 2019 Share Posted January 11, 2019 Hello I have to move a website to a new adress because the URL changed. Can I copy all the templates and fields and contents in the fields from processwire and somehow install it in the new address/database? Or do I have to make the content all over again? thanks for all help Jakob Link to comment Share on other sites More sharing options...
psy Posted January 11, 2019 Share Posted January 11, 2019 Yes, you can duplicate your site on a new domain. There are modules that will help you do this but I'm a bit old school and prefer to do it manually when moving PW sites. Take a copy of the database, either with the ProcessWire module, DatabaseBackups or via PhpMyAdmin and download to your PC Download all your PW files to your PC, especially site/config In your new site, create a MySQL database and make a note of the db credentials Import your database sql file via PhpMyAdmin Upload your files to the new domain Edit your site/config.php file to include the new database credentials and the http hosts to the new domain name Clear your cache, especially ProCache if you use it Should then be all good to go PS: It's important to use your original site/config.php file as it contains the password salt for the original database 6 Link to comment Share on other sites More sharing options...
kuba2 Posted January 11, 2019 Author Share Posted January 11, 2019 Thanks for Your answer. I have a follow-up question. The "new" website is on the same server/hosting...does this mean I can use the old database and "link" it to the new website? If I use the same site/config...would this new site use the existing database in the same manner as the old site does. Thanks for all Input. I have no experience with databases, but the idea above makes sense to me. hope this is doable like that. Thanks again Link to comment Share on other sites More sharing options...
psy Posted January 12, 2019 Share Posted January 12, 2019 @kuba2 1. yes 2. yes, after you've uploaded all the PW files to the new domain name folder When the new website URL/domain name is on the same server/web hosting account and has access to the same database, all you need to change is the site/config.php https hosts array to accept the new URL(s). Easy, peasy, lemon squeezy ? PS: either put the new URL(s) at the start of the $config->httpHosts array to give them priority or remove the old ones to prevent PW confusion 1 Link to comment Share on other sites More sharing options...
kuba2 Posted January 12, 2019 Author Share Posted January 12, 2019 Thank You very much! Great answers! Have a great weekend. 1 Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now