mmc

How to publish a complete site ?

Recommended Posts

My current Processwire project has been finalized and tested on a private development server. I'd like to publish the entire site now and copy/move it to the production server.  I haven't found that much about this topic so I expect that it must be pretty easy. What is the best procedure to achieve this ? I can of course move the site folder but what's with the database ? Maybe other steps are involved as well ?

Regards, Michael

Share this post


Link to post
Share on other sites

The steps I can think of right away would be...

  • Moving the site files to the server. This is should be quite straightforward: use the scp command, or an SFTP application, or whatever you prefer. Just get the files to the production server somehow.
  • The database part depends a bit on the tools you have available, but basically you need some way of exporting it as an SQL dump from the dev server to the production server. If you're familiar with command line tools, mysqldump is one way to do this – here's one guide for that. If you have a tool like phpMyAdmin installed, it has tools for both exporting (on the dev server) and importing (on the production server) SQL dumps.
    • Note that you may have to create the database and related MySQL user on the server beforehand. This, again, depends a bit on your particular server setup.
  • Check your /site/config.php on the production server and make sure that the domains and database credentials in there match the ones you're using in production.

... and that's pretty much it, I think. Hopefully I didn't forget anything important – my own process is a bit different, so I don't really do this that often :)

Obviously there will be some more generic things to take care, such as connecting a domain to your production server, and so on and so forth. For these I'd refer to any instructions your hosting provider might have.

  • Like 2

Share this post


Link to post
Share on other sites

I think Duplicator is an easy way to do this. It worked here.

 

  • Like 3

Share this post


Link to post
Share on other sites
On 3.3.2018 at 10:04 AM, teppo said:

... and that's pretty much it, I think. Hopefully I didn't forget anything important – my own process is a bit different, so I don't really do this that often :)

Finally I've managed to migrate the site. In principle it is very easy and very close to the procedure @teppo has described. But there are some pitfalls. After the initial migration, I couldn't even call the pw admin site. Both the admin and the web site produced error messages.

It took me a while to find out that I had to edit the .htaccess file as well. My prod server didn't work with some dev server settings. 

Last issue was that some pictures had absolute paths instead of relatives. No idea what has caused this. A bug or my mistake ? No clue, but they were of course not accessible from the prod server. I changed the wrong paths manually on the prod server and that's pretty much it. Site works now.

Next time I'll try the duplicator app. Maybe that will work a bit smoother.

  • Like 2

Share this post


Link to post
Share on other sites

I would adapt the local server to be as much equal as the production server, if possible. 

  • Like 3

Share this post


Link to post
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

  • Recently Browsing   0 members

    No registered users viewing this page.