Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8269717
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T06:19:22+00:00 2026-06-08T06:19:22+00:00

I wrote this little BASH script that creates a folder,unzips WordPress and creates a

  • 0

I wrote this little BASH script that creates a folder,unzips WordPress and creates a database for a site.

The final step is actually installing WordPress, which usually involves pointing your browser to install.php and filling out a form in the GUI.

I want to do this from the BASH shell, but can’t figure out how to invoke wp_install() and pass it the parameters it needs:

-admin_email
-admin_password
-weblog_title
-user_name

(line 85 in install.php)

Here’s a similar question, but in python

#!/bin/bash

#ask for the site name
echo "Site Name:"
read name
# make site directory under splogs
mkdir /var/www/splogs/$name
dirname="/var/www/splogs/$name"
#import wordpress from dropbox
cp -r  ~/Dropbox/Web/Resources/Wordpress/Core $dirname
cd $dirname
#unwrap the double wrap
mv Core/* ./ 
rm -r Core
mv wp-config-sample.php wp-config.php 
sed -i 's/database_name_here/'$name'/g' ./wp-config.php
sed -i 's/username_here/root/g' ./wp-config.php
sed -i 's/password_here/mypassword/g' ./wp-config.php
cp -r ~/Dropbox/Web/Resources/Wordpress/Themes/responsive $dirname/wp-content/t$
cd $dirname

CMD="create database $name"
mysql -uroot -pmypass -e "$CMD"

How do I alter the script to automatically run the installer without the need to open a browser?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-08T06:19:24+00:00Added an answer on June 8, 2026 at 6:19 am

    Check out wp-cli, based on Drush for Drupal.

    wp core install --url=url --title=site-title [--admin_name=username] --admin_email=email --admin_password=password
    

    All commands:

    wp core [download|config|install|install_network|version|update|update_db]
    wp db [create|drop|optimize|repair|connect|cli|query|export|import]
    wp eval-file
    wp eval
    wp export [validate_arguments]
    wp generate [posts|users]
    wp home
    wp option [add|update|delete|get]
    wp plugin [activate|deactivate|toggle|path|update|uninstall|delete|status|install]
    wp post-meta [get|delete|add|update]
    wp post [create|update|delete]
    wp theme [activate|path|delete|status|install|update]
    wp transient [get|set|delete|type]
    wp user-meta [get|delete|add|update]
    wp user [list|delete|create|update]
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have wrote this little script which generates a nice random password. The problem
I wrote a little script that check something, and i want a command to
I wrote this little web app that lists the websites running on the local
I wrote this little test script in Ruby (on MacOS): #!/usr/bin/ruby require 'digest/sha2' def
I wrote a bash script that fetches lyrics from a website. The script is
I wrote this little snippet that should format money but its failing on the
I want to backup my ubuntu filesystem, and I wrote this little script. It
I wrote this little script to format a timedelta object according to my needs:
I wrote this little function to fill a drop down list with data from
I wrote this little code std::map<int,template<class T>> map_; map_.insert(make_pair<int,message>(myMsg.id,myMsg)); but the compiler doesn't seem

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.