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 :
---
1 2 | chmod +x wordpress_wget.sh sh 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
- Rename
wp-config-sample.php
towp-config.php
- Deletes
readme.html
andlicense.txt
files (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 :
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 | #!/bin/bash # 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" wget http://wordpress.org/latest.tar.gz echo "WordPress tar ball downloaded" tar -xzvf latest.tar.gz echo "WordPress tar ball uncompressed" rm latest.tar.gz cd wordpress mv * .. cd .. 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" rm readme.html rm license.txt clear echo "+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++" 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 |" echo "+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++" 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.
Tagged With cat a file that has wget bash script , custom wget bash script , source the wget base file and cat all into a bash script , wget to run php script windows , wget wordpress