This plugin creates the possibility to add media content from a Phraseanet Instance directly into the Gutenberg Block.
Manual installation (developer)
Plugin Activation and Configuration
Run on Docker and Docker development
-
PHP >= 7.0
-
WordPress >= 5.5
-
Chrome/Chromium 20+
-
Firefox 15+
-
Safari 5+
-
Opera 11+
-
IE 8+
-
Download the plugin on Phraseanet.com
-
Upload it to WordPress Admin using the Plugin section
-
Enable the plugin in the WordPress Admin using the Plugin section
-
Configure the plugin in the new WordPress Settings menu
WP Phraseanet
You need Composer before continuing.
cd your-wordpress-root/wp-content/plugins/
git clone https://github.com/alchemy-fr/Phraseanet-Wordpress-Plugin.git
cd Phraseanet-Wordpress-Plugin
composer install --dev
composer update
Once the plugin is installed, activate it. You must then configure it in the Settings > WP Phraseanet menu.
Make your system meets the prerequisites before dive in.
-
Docker >=19.03.13
-
Docker-composer >=1.26.0
https://www.docker.com/get-started
System | Link |
---|---|
Linux | Docker for linux |
Macintosh | Docker for mac |
Windows | Docker for windows |
Note: All our images are Linux based, so with Macintosh and Windows hosts, the containers run in vm provided by Docker. For optimal performances, prefer a Linux host.
It may be easier to deal with a local file to manage our env variables.
You can add your env.local
at the root of this project and define a command function in your ~/.bashrc
:
# ~/.bashrc or ~/.zshrc
function dc() {
if [ -f env.local ]; then
env $(cat env.local | grep -v '#' | tr '\n' ' ') docker-compose $@
else
docker-compose $@
fi
}
WP_SUBNET_IPS=172.31.0.0/16
WP_APP_PORT=8080
nginx-conf is locted in the nginx-conf dir
Mysql's my.cnf in located in the mysql dir
COMPOSE_FILE=docker-compose.yml:docker-compose.db.yml
For dev purpose use COMPOSE_FILE=docker-compose.override.yml:docker-compose.db.yml check Development mode for more details.
MYSQL_ROOT_PASSWORD=password
MYSQL_DATABASE=phraseanet_wordpress
SITE_TITLE=Phraseanet for worpdress
WP_ADMIN_USERNAME=admin
WP_ADMIN_PASSWORD=admin123
WP_ADMIN_EMAIL=admin@admin.com
WP_UPDATE=auto #auto -> auto update if available and #never -> don't update keep the current version
PHRASEANET_PLUGIN_INSTALL=one
(one) plugin is install only at first launch and (always) plugin is install at each entry point execution.
PHRASEANET_BO_URL=YOUR PHRASEANET URL
PHRASEANET_BO_TOKEN=PHRASEANET TOKEN
PHRASEANET_BO_CLIENT_ID=PHRASEANET CLIENT ID
PHRASEANET_BO_SECRET=PHRASEANET SECRET
After making the necessary changes in the .env that are mentioned above you just need to run docker-compose up
or docker-compose -d up
On the first run this will download all the required images from the docker registry and download the WordPress and Phraseanet modules and auto-install and set up them for you, So this process will take a while to complete on the first run.
In the .env use this COMPOSE_FILE=docker-compose.override.yml:docker-compose.db.yml On the first run, phraseanet plugin code from root directory will be auto-installed in the WordPress. You can make live changes in the plugin.
The plugin installation and plugin settings are located in the docker-entrypoint.sh
This will attach the current code to /var/www/html/wp-content/plugins/Phraseanet-Wordpress-Plugin/ with composer install --dev
Run docker exec -it wordpress bash
This will create a new Bash session in the WordPress container
File | Info |
---|---|
docker-compose.yml | for production |
docker-compose.override.yml | for development |
docker-compose.db.yml | for database |
-
mysql - database
-
gateway - nginx reverse proxy
-
wordpress - main application
DRIVER | VOLUME NAME |
---|---|
local | DB |
local | WPDATA |
REPOSITORY | TAG |
---|---|
mysql | latest |
php | 7.4.4-fpm-alpine3.11 |
nginx | 1.17.4-alpine |
This project is licensed under the GPLv3.
Why GPL ? Because this plugin embeds GPL products (Flowplayer, Flexslider).