This bash script is does not add database details or change site name, unlike our previous script to install WordPress. Your Working Server Will Be Ready to Run the Installer From Browser Web Interface. This Bash Script to wget WordPress Will Perform Some Automation Possibly Most sysadmins will will want. It automates the boring part and for bash shell itself gets auto deleted.
Bash Script to wget WordPress : How to Use and What it Performs
Most advanced users do not want automation of all the steps for WordPress Installation. Man to man choice varies widely.
Normally, you are going to the FTP root of your installation (where you’ll install WordPress), wget this Bash Script to wget WordPress from GitHub and do the next steps like performing a test run. For test run, you can create a test directory on your Mac or GNU/Linux PC or server and wget this Bash Script to wget WordPress from GitHub. Then run :
chmod +x wordpress_wget.sh
It will :
- wget WordPress
- Uncompress the tar ball
- Remove the tar ball
- cd to the uncompressed directory
- Move all the WordPress files and directories to one level up – at the directory level where the bash script is placed
- Remove the empty uncompressed directory
license.txtfiles (there is no meaning to advertise that it is WordPress, you know that WordPress is under GNU GPL)
- In case of bash, oh-my-zsh shells, the script (
wordpress_wget.sh) will get auto deleted
Remaining work is to point towards the domain/IP start installation of WordPress. That process actually tests the proper permission of the files and directories, fill up with
wp-salt etc. Here is a screenshot from our Mac :
The Source Code of the Bash Script to wget WordPress
There is not huge tricks, it is just an easy script :
# WGET script for Latest WordPress by Dr. Abhishek Ghosh
# License : GNU GPL 3.0
# for test run, put in any empty dir and run
echo "WGET WordPress Script"
echo "WordPress tar ball downloaded"
tar -xzvf latest.tar.gz
echo "WordPress tar ball uncompressed"
mv * ..
rm -r wordpress
echo "WordPress files moved where this script is"
mv wp-config-sample.php wp-config.php
echo "wp-config.php is copied"
echo "| Complete! |"
echo "| |"
echo "| Open browser window and start installation of WordPress |"
echo "| or edit wp-config.php in case of moving WordPress. |"
echo "| |"
echo "| For WordPress and Server tutorials visit : |"
echo "| |"
echo "| https://thecustomizewindows.com |"
rm -- "$0"
These few lines are hugely painful to do for repeat works. We could use sed to add some data, but basically for Apache, Nginx there are other works. This set is crux of the most commonly done steps.
Follow the Author of this article :