installing wordpress from a script

Discussion in 'PHP' started by webboy, Jul 8, 2009.

  1. #1
    Hi all I am trying to install word press from a php script on my hosting server ?is this correct way to execute the command

    exec ("wget -q http://www.mdomain.com/wp-admin/install.php?step=1",$output);
    as i cannot get it to work?

    i do have wget enabled on the hosting account
     
    webboy, Jul 8, 2009 IP
  2. jestep

    jestep Prominent Member

    Messages:
    3,659
    Likes Received:
    215
    Best Answers:
    19
    Trophy Points:
    330
    #2
    Do you have ssh access.

    Try this:

    exec ("/usr/local/bin/php -f /path/to/my/domain/wp-admin/install.php?step=1",$output);

    You may need to change the php path depending on your server. Your host may have exec disabled. Is this a shared or semi/dedicated server?
     
    jestep, Jul 8, 2009 IP
  3. webboy

    webboy Peon

    Messages:
    109
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    This is shared hosting and I dont have ssh
     
    webboy, Jul 8, 2009 IP
  4. jestep

    jestep Prominent Member

    Messages:
    3,659
    Likes Received:
    215
    Best Answers:
    19
    Trophy Points:
    330
    #4
    Most likely you wont be able to install like this.

    You could possibly try using file_get_contents instead of exec. Not sure if that would work for your requirements, but would have the exact same affect as exec(wget
     
    jestep, Jul 8, 2009 IP
  5. anthonywebs

    anthonywebs Banned

    Messages:
    657
    Likes Received:
    13
    Best Answers:
    0
    Trophy Points:
    0
    #5
    fantastico on cpanel is what i would use :)
     
    anthonywebs, Jul 8, 2009 IP