Skip to content

Instantly share code, notes, and snippets.

@luispcar
Last active January 13, 2021 13:34
Show Gist options
  • Save luispcar/747ab705f5116c3c5d9d325c5293295b to your computer and use it in GitHub Desktop.
Save luispcar/747ab705f5116c3c5d9d325c5293295b to your computer and use it in GitHub Desktop.
#!/bin/bash
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/
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 ../
mv PHPModules/mysqlnd.so PHPModules/A-mysqlnd.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
mv ./wordpress/wp-config-sample.php ./wordpress/wp-config.php
echo "WordPress is Installed!"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment