modifiedcontent Posted December 8, 2019 Share Posted December 8, 2019 What is currently the best way to move a Processwire site to a new server? I have to upgrade my VPS, from CentOS 6 to CentOS 8. I have several relatively complicated Processwire websites. I am currently downloading all the files via FTP. I will export databases next. I guess I'll use Export Site Profile. Or had that been replaced by something else? New modules that I missed? Or will the FTP'ed files + exported database be enough? Just copy them 1-on-1 to the new server and it will all work? What can go wrong? What are the pitfalls to watch out for? Link to comment Share on other sites More sharing options...
rick Posted December 8, 2019 Share Posted December 8, 2019 The procedure I use is: Old Server: Download the database export. Download the site folder (you can skip cache). New Server: Install Processwire (same version). Delete the site folder and Empty the database. Upload the site folder from the old host. Import the database from the old host. Empty cache and sessions. Update the config.php where necessary (database credentials, etc.). Creating a site profile is not necessary. [edit] Since all my machines are *nix based, I use rsync to maintain duplicates: rsync -azP host:source destination 2 1 Link to comment Share on other sites More sharing options...
wbmnfktr Posted December 8, 2019 Share Posted December 8, 2019 I did just that with the DEV version of the Duplicator module. It went super smooth. Install the module (dev version) change some settings create an export download installer and archive upload installer and archive done All you need is a new database and of course access to upload those files. 2 1 Link to comment Share on other sites More sharing options...
modifiedcontent Posted December 8, 2019 Author Share Posted December 8, 2019 Excellent. Thanks rick and wbmnfktr. I'll do this in the coming weeks and will report back. Link to comment Share on other sites More sharing options...
bernhard Posted December 9, 2019 Share Posted December 9, 2019 21 hours ago, modifiedcontent said: Or will the FTP'ed files + exported database be enough? Just copy them 1-on-1 to the new server and it will all work? That should be enough. You just need to make sure that the server setup works, so I'd install a fresh copy of PW manually to see if that works. Then you create the db user on the new server, restore the db, copy your files and you should be up and running. I'm not saying anything against the other 2 recommendations. Just answering your question ? 1 1 Link to comment Share on other sites More sharing options...
modifiedcontent Posted March 14, 2020 Author Share Posted March 14, 2020 A few more points to watch out for. You need to copy the Authentication Salt in config.php to be able to use your login from the old database: /** * Installer: User Authentication Salt * * Must be retained if you migrate your site from one server to another * */ Installed modules and customizations can also mess up things. After simply uploading my backed-up /site folder into the new installation, I got a scary fatal server error. To step back I restored the /site folder of the fresh installation. I had replaced the fresh install database with my original backed-up database. That worked fine. I see all my old content and templates etc. in the admin area. Next I have uploaded all modules from the backed-up /site/modules to the new installation /site/modules. In the back-end I have clicked Refresh in Modules. It finds the modules and installs them. You may have to repeat Refresh a few times. I still keep getting this error: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'field_headshot.filedata' in 'field list' After uploading the rest of the backed-up /site folder, everything else seems to work fine. 2 Link to comment Share on other sites More sharing options...
Mantas Posted August 23, 2021 Share Posted August 23, 2021 On 12/8/2019 at 5:17 PM, rick said: Empty cache and sessions. What would be the best way to empty those? Link to comment Share on other sites More sharing options...
DV-JF Posted August 23, 2021 Share Posted August 23, 2021 Hey @Mantas, welcome to the forum and to ProcessWire ? 2 hours ago, Mantas said: What would be the best way to empty those? To do so I just delete the following folders via FTP: /site/assets/cache/*/*.* /site/assets/sessions/*/*.* and truncate the table "caches" in the DB. After that you have to relogin and do a "module refresh" via "/processwire/module/?reset=1". That's the way I do it. 2 1 Link to comment Share on other sites More sharing options...
jon9china Posted July 12, 2022 Share Posted July 12, 2022 What if you are moving a site to a new server but changing domain name in the process? Are there some other steps that are required? Link to comment Share on other sites More sharing options...
Gideon So Posted July 12, 2022 Share Posted July 12, 2022 Hi @jon9china Nothing special to switch domain. Just remember to edit your config.php file and change $config->httpHosts to your new domain. $config->httpHosts = array('yournewdomain.com'); Gideon 2 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