Created
January 25, 2021 03:45
-
-
Save mkober/5c95a126074e38317f74821b220c258e to your computer and use it in GitHub Desktop.
Shell Script to Install WordPress on Repl.it
This file contains 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
#!/bin/bash | |
# Source: https://repl.it/talk/learn/Installing-WordPress-on-Replit/34284 | |
mkdir Work | |
cd Work | |
wget http://archive.ubuntu.com/ubuntu/pool/main/p/php7.2/php7.2-mysql_7.2.3-1ubuntu1_amd64.deb | |
wget http://archive.ubuntu.com/ubuntu/pool/main/p/php7.2/php7.2-sqlite3_7.2.3-1ubuntu1_amd64.deb | |
wget https://wordpress.org/latest.zip | |
wget https://downloads.wordpress.org/plugin/sqlite-integration.1.8.1.zip | |
for Module in $( ls php*.deb ) | |
do | |
dpkg -x $Module . | |
done | |
unzip -d ../ latest.zip | |
mkdir ../PHPModules/ # Made for PHP libraries | |
cp usr/lib/php/*/* ../PHPModules/ | |
wget https://downloads.wordpress.org/plugin/sqlite-integration.1.8.1.zip | |
unzip sqlite-integration.1.8.1.zip | |
cp sqlite-integration/db.php ../wordpress/wp-content/ | |
mv sqlite-integration/ ../wordpress/wp-content/plugins/ | |
cd ../ # Changing work dir | |
mv PHPModules/mysqlnd.so PHPModules/A-mysqlnd.so # Only for change sequence (mysqlnd.so should be loaded before mysqli.so) | |
echo 'extension=pdo.so' > php.ini | |
for Module in $( ls PHPModules/* ) | |
do | |
echo "extension=$Module" >> php.ini | |
done | |
echo 'run = "php -c php.ini -S 0.0.0.0:8000 -t wordpress/"' > .replit | |
rm -R Work |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment