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
furrygalaxy (1)

What do i put in the database username and password?

ThePolishPPK (2)

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

furrygalaxy (1)

@ThePolishPPK how about the database host?

ThePolishPPK (2)

@furrygalaxy You don't need that if you use SqlLite. If you want store data on external server you shoud buy a database.
If you use SqlLite set 'Database host' blank or write random letters eg. 'example.com'.

furrygalaxy (1)

@ThePolishPPK so meaning, this is uh.. Weird?Image

ThePolishPPK (2)

@furrygalaxy Ohh, sorry, I never seen that error. Try change name of file wordpress/wp-config-sample.php to wp-config.php that shoud skip database configuration.

furrygalaxy (1)

@ThePolishPPK yeah that works now thank you, but uh.. The website looks like uhh not normal? hhh.furrygalaxy.repl.co

furrygalaxy (1)

@ThePolishPPK nvm it only seems to break at mobile.

ThePolishPPK (2)

@furrygalaxy For me it looks ok.
If you want to use Wordpress not for tests then change your secret keys in wp-config.php file. You can generate those keys.

furrygalaxy (1)

@ThePolishPPK everythings working ok now. Thanks for the help.