Installing WordPress on Repl.it
h
ThePolishPPK (2)

WordPress need some php libraries unavalible in repl enviroment. This article show you how to install this libraries.

Creating working directory

mkdir Work
cd Work

Downloading all required files

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

WordPress need MySQL module to work. If you want use SQLite in your project, download SQLite module for PHP:

wget https://downloads.wordpress.org/plugin/sqlite-integration.1.8.1.zip

Unpacking WordPress and PHP libraries

for Module in $( ls php*.deb )
do
	dpkg -x $Module .
done

unzip -d ../ latest.zip

Moving files to good directories

mkdir ../PHPModules/ # Made for PHP libraries
cp usr/lib/php/*/* ../PHPModules/
If you are decided to use SQLite download, unpack and install extension
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/

Creating php.ini file with extensions

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

Creating Replit startup file

echo 'run = "php -c php.ini -S 0.0.0.0:8000 -t wordpress/"' > .replit

Removing all unused files

rm -R Work

Summary

You now have installed all required modules and WordPress.
Now you can start work.
Good Luck )))

You are viewing a single comment. View All
ThePolishPPK (2)

@furrygalaxy If you use Sqlite, can be nothing else username and password )))