Created
January 16, 2020 03:39
-
-
Save zevaryx/408c861fd2f66282879b90d9ca2f92d2 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Run as admin!!! | |
| # Move to the root of your website | |
| cd /home/admin/web/fennecology.com/web/public_html | |
| # Download the latest version of WordPress | |
| wget https://wordpress.org/latest.tar.gz -O wordpress.tar.gz | |
| # "Unzip" the file | |
| tar -zxvf wordpress.tar.gz | |
| # Move the wordpress files into the root | |
| mv wordpress/* . | |
| # Cleanup | |
| rm -rf wordpress.tar.gz wordpress | |
| # Copy the example configuration to the actual configuration | |
| cp wp-config-sample.php wp-config.php | |
| # Set the username and password to the database here | |
| sed -i 's/database_name_here/admin_wordpress' wp-config.php | |
| sed -i 's/username_here/admin_wordpress' wp-config.php | |
| sed -i 's/password_here/y4CH6Zxb53J3bQfe' wp-config.php | |
| # Set WP salts | |
| # Taken from https://gist.github.com/bgallagh3r/2853221 | |
| # This is for security stuff | |
| perl -i -pe' | |
| BEGIN { | |
| @chars = ("a" .. "z", "A" .. "Z", 0 .. 9); | |
| push @chars, split //, "!@#$%^&*()-_ []{}<>~\`+=,.;:/?|"; | |
| sub salt { join "", map $chars[ rand @chars ], 1 .. 64 } | |
| } | |
| s/put your unique phrase here/salt()/ge | |
| ' wp-config.php | |
| # Create an uploads folder | |
| mkdir -p wp-content/uploads | |
| # Allow RWX for admin, RX for everyone else | |
| chmod 775 wp-content/uploads |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment