Installing WordPress from a CLI script
-
I’m trying to write some code to install wordpress from a CLI script. I have a number of sites to setup and going to through installer for each one is tedious.
After generating the appropriate wp-config.php, my script looks like this…but it doesn’t seem to work. Ideas?
#!/usr/bin/php -q <?php include ('/web/www.example.com/html/wp-load.php'); include ('/web/www.example.com/html/wp-admin/install.php'); $result = wp_install('/web/www.example.com/html/', 'dbname', 'someone@example.com', 1, '', 'password'); extract( $result, EXTR_SKIP ); print "result was $result\n"; ?>
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
The topic ‘Installing WordPress from a CLI script’ is closed to new replies.