Installing Wordpress with Epinio
Create a directory for your application:โ
mkdir wordpress
cd wordpress
Get the code:โ
https://wordpress.org/download/#download-install
wget https://wordpress.org/latest.tar.gz
tar xvf latest.tar.gz
mv wordpress htdocs
rm -rf latest.tar.gz
Create a buildpack.yml for your applicationโ
cat << EOF > buildpack.yml
---
php:
version: 8.0.x
script: index.php
webserver: nginx
webdirectory: htdocs
EOF
Enable needed php extensionsโ
The PHP buildpack supports additional ini files for PHP through the PHP_INI_SCAN_DIR mechanism.
We need zlib and mysqli extensions enabled:
mkdir .php.ini.d
cat << EOF > .php.ini.d/extensions.ini
extension=zlib
extension=mysqli
EOF
Deployโ
epinio push --name wordpress
Additional stepsโ
Wordpress needs a database to work. After visiting the route of your deployed application you will have to set the connection details to the database.
You can use the Service feature to deploy your database with Epinio. Of course, deploying a database manually is still possible.