Jump to content

PW Online Installer (download of latest PW install to server)


Soma
 Share

Recommended Posts

ProcessWire Online Installer

Since there's now a shortcut to download latest stable PW http://grab.pw , I created a simple helper PHP script you can upload to your server to download and extract a new PW installation.

  1. Upload this php file to the server where you want to install latest ProcessWire
  2. Go to the browser and call this script. It will download and extract ProcessWire files. Once done successfully it will redirect to the installer. Downloaded zip the grabpw.php will be removed.
  3. If anything fails, make sure permission are correct on server and you remove files manually in case.
I tested this on my local XAMPP (Mac) install and on some of my account on a ISP. Also I took some methods to download and extract files from my ModulesManager which seems to be "reliable" so far.
 
Download
The script can be found on github: https://github.com/somatonic/PWOnlineInstaller
 
Why
Just because it's cool. :) There's many ways to accomplish this task if you have ssh access for example using shell. Just wanted to have this alternative and maybe people find this useful too.
 
@ryan. Do you think you could provide an latest dev shortcut url too? :)
  • Like 18
Link to comment
Share on other sites

Why
Just because it's cool.

It's very cool :)

Edit: working perfectly on my localhost. And it even took care of changing the htaccess file name for me!

  • Like 2
Link to comment
Share on other sites

Thanks diogo for testing. Then it seems you also run into a problem with permission locally. If it didn't rename the htaccess file when manually copying PW files it's because apache user and your local user are not the same (along these lines). I think I experience the same, but I changed some permission for apache to run as my user and it also works manually now.

Edti: I just updated the script to also remove the zip and script when everything is done.

Link to comment
Share on other sites

The only two errors I'm getting are:

Warning: file_get_contents() [function.file-get-contents]:
It is not safe to rely on the system's timezone settings. You are
*required* to use the date.timezone setting or the
date_default_timezone_set() function. In case you used any of those
methods and you are still getting this warning, you most likely
misspelled the timezone identifier. We selected 'Antarctica/Macquarie'
for 'EST/10.0/no DST' instead in /home/site/public_html/pwinstall/grabpw.php on line 73

Warning: file_get_contents(http://grab.pw) [function.file-get-contents]: failed to open stream: HTTP request failed! in /home/site/public_html/pwinstall/grabpw.php on line 73

File could not be downloaded http://grab.pw

Link to comment
Share on other sites

Hello Soma.

      Works perfectly! on localhost.

      Is it possible to include some 'must' moduls as well?.

Regards.

You can use ModulesManager to download/install modules already.

The only two errors I'm getting are:

Warning: file_get_contents() [function.file-get-contents]:

It is not safe to rely on the system's timezone settings. You are

*required* to use the date.timezone setting or the

date_default_timezone_set() function. In case you used any of those

methods and you are still getting this warning, you most likely

misspelled the timezone identifier. We selected 'Antarctica/Macquarie'

for 'EST/10.0/no DST' instead in /home/site/public_html/pwinstall/grabpw.php on line 73

Warning: file_get_contents(http://grab.pw) [function.file-get-contents]: failed to open stream: HTTP request failed! in /home/site/public_html/pwinstall/grabpw.php on line 73

File could not be downloaded http://grab.pw

I have no idea what this error is about, looks like some server configuration issue?

Link to comment
Share on other sites

Works great for me–awesome tool Soma! I have added a note about it to our download page: 

http://processwire.com/download/

It looks like the domain forwarding service I'm using (Namecheap) won't let me add redirects for anything other than www and @. So I can't add a dev download just yet. But I'll plan to add a dev.grab.pw or grab.pw/dev once I move the DNS.  

  • Like 2
Link to comment
Share on other sites

  • 2 weeks later...

Tried running this install script on a local Xampp setup.

I got this error message:

Warning: file_get_contents(http://grab.pw): failed to open stream: Unable to find the socket transport "ssl" - did you forget to enable it when you configured PHP? in C:\xampp\htdocs\grabpw.php on line 74
File could not be downloaded http://grab.pw

I've not made any changes to the file, so far...

I had another wordpress install script, and it was working, I grabbed a fresh copy of Xampp, and those were not running now either, maybe my Xampp setup is having issues. The wordpress installer sets up the db and everything, that is where it is now failing. nevermind about the wp stuff of course  :P 

Going to line 74 now, any suggestions appreciated.

[edit]: If I can get this running, how do I install to a sub-folder, does the script install right in the folder where it resides.

so if it were in the HTdocs root folder, it would be a root install then? Plus just to double check, I'll need to manually create the db first, I'm thinking?

Link to comment
Share on other sites

Tried running this install script on a local Xampp setup.

I got this error message:

Warning: file_get_contents(http://grab.pw): failed to open stream: Unable to find the socket transport "ssl" - did you forget to enable it when you configured PHP? in C:\xampp\htdocs\grabpw.php on line 74

File could not be downloaded http://grab.pw.

Maybe these will help?

http://stackoverflow.com/questions/5801425/enabling-ssl-with-xampp

http://stackoverflow.com/questions/2643462/setting-up-ssl-on-a-local-xampp-apache-server

http://www.apachefriends.org/f/viewtopic.php?t=31448

Link to comment
Share on other sites

Looks like you don't have openssl installed...

It says in the readme, "put this script where you want to install PW" so yes it will download files to where the script lies.

Yes the DB you have to create yourself.

Link to comment
Share on other sites

Does it sound like I need to make changes to my Xampp PHP directory 'php.ini'...

If so I'm unsure of what changes would need to be made. thanks.

Ooops sorry guys this one crossed the wires with the replies above... thanks for the help.

I'll look at the suggested resources then, and get back.  :)

Link to comment
Share on other sites

I think I got it, lin 1009 of the php.ini is commented out:

;extension=php_openssl.dll

I'm assuming, that line beginning with the ; means it's commented out.

Was unaware of that commenting method, so here's a link to the parsing the INI file for php:

http://php.net/manual/en/function.parse-ini-file.php

Attempting to rerun then here in a few.

thanks, again.

[Hint: Don't forget to restart your xampp server, after making the php,ini file change, found at xampp/php/php.ini]

  • Like 1
Link to comment
Share on other sites

Sweet success... :)

It loaded up, the install page at the localhost root.

Now to try a few sub-folder installs ;)

Thanks soma!

Quick question are time-outs ever a problem if on a slow connection?

Looks like the default time out is maybe only 60 seconds for the download to happen?

This could also necessitate changes to one's INI file, or checking with your host if it's a hosted server environment.?

Oops looks like timeouts were covered earlier in the thread, and those involve several places that may need timeouts changed.

Where Soma mentions the scripts is set to 120 sec.

Thanks again.

  • Like 1
Link to comment
Share on other sites

  • 1 month later...

I think I got it, lin 1009 of the php.ini is commented out:

;extension=php_openssl.dll

I'm assuming, that line beginning with the ; means it's commented out.

Was unaware of that commenting method, so here's a link to the parsing the INI file for php:

http://php.net/manual/en/function.parse-ini-file.php

Attempting to rerun then here in a few.

thanks, again.

[Hint: Don't forget to restart your xampp server, after making the php,ini file change, found at xampp/php/php.ini]

Nice catches. These same steps helped me.

Thanks a bunchload @Soma! This really helped me. This + your Simple Site profile installed splendidly for me. Such a time-saver!

  • Like 1
Link to comment
Share on other sites

  • 4 weeks later...

So, I guess the modules manager is the must module that should be installed :)

But now you can install modules with the core install already, so first thing you could do is click "new" and enter ModulesManager and download/install, done. :D

  • Like 1
Link to comment
Share on other sites

  • 5 months later...

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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...