WordPress, publishing platform – Including PostgreSQL database backend mod
10K+
Note: This container is automatically built by docker-image-rebuilder every night and will receive updates whenever the upstream Alpine packages or WordPress files change. (Dockerfile)
WordPress as packaged by upstream with minimal changes to allow for running with the PostgreSQL database system instead of MySQL:
pgsql PostgreSQL client extensiondb.php hook script is placed in the right directoryPlease note that is by no means an officially supported configuration and there may be issues with some plugins!
Please see the “How to use this image” section of the official WordPress container (while mentally substituting PostgreSQL for each occurance of MySQL). Note WordPress will copy the WordPress data files to the container's current working directory, defaulting to /var/www/html. When you use this container please ensure that you add data volumes for at least the wp-config and wp-content sub-directories of your working directory or data will be lost when upgrading!
“PostgreSQL for WordPress” works by registering as the WordPress default database driver and then rewriting all database queries (intended for MySQL) before sending them to your PostgreSQL database. Since the SQL-dialect used by MySQL is very different from the SQL-standard-orientend dialect used by PostgreSQL this can and will cause issues at times.
If are luckey enough to hit a database-related issue with some WordPress plugin using this image you may be able to fix it using the following guide. (Basic Unix-Shell and PHP knowledge, as well as some more in-depth experience with SQL will likely be necessary.)
wp-content directory in a shellgit clone https://github.com/kevinoid/postgresql-for-wordpress.gitpg4wp subdirectory of that checkout:ln -s postgresql-for-wordpress/pg4wppg4wp/driver_pgsql.php and find out which query fails and on what MySQLism it reliedContent type
Image
Digest
sha256:ca6dcf73a…
Size
74.5 MB
Last updated
over 2 years ago
docker pull ntninja/wordpress-postgresql