Skip to content

Installation

Benoit Alessandroni edited this page Nov 11, 2017 · 10 revisions

Prerequisites

This plugin is intended to work on top of a classic PHP Web stack. So, if it is not done yet, please get and install:

  • A web server (Apache or Nginx or whatever you prefer): Apache2 configuration will be detailed
  • PHP 5.xx
  • MySQL and PHPMyAdmin as it is easier to configure and work using PHPMyAdmin

Additionally, as this is a Wordpress plugin, the next step will be to install Wordpress. So, begin by downloading the current Wordpress version here: https://wordpress.org/ Then, I will leave you with the official Wordpress documentation as it is pretty straightforward: https://codex.wordpress.org/Installing_WordPress

Apache configuration

As the plugin is using specific permalinks to deliver content from the included templates pages, you will need to make sure Apache is able to deliver rewritten URLs.

First step is to ensure you enable the apache2 rewrite module:

  sudo a2enmod rewrite

Then restart the apache2 service:

  sudo service apache2 restart

Then, in your apache default virtual host configuration located in /etc/apache2/sites-avaible/000-default.conf, modify the AllowOverride flag from None to All, to allow the module to work properly. The exact syntax should then be:

  AllowOverride all

For more explaination on this part please refer to either the Apache documentation or StackOverflow resources, such as here: http://stackoverflow.com/questions/17745310/how-to-enable-mod-rewrite-in-lamp-on-ubuntu

All the configurations presented here is based on a classic Ubuntu Distribution. If you work on Mac or Windows please feel free to enrich all of the sections.

Wordpress configuration

Then in the Wordpress backend, you will need to go to the 'Settings' > 'Permalinks' section, and choose the PostName configuration for handling your LDP resources permalinks.

Then save, and continue with the...

Plugin installation

Plugin download

You can install the last stable version of this plugin from the WordPress plugin repository, check here

Installing from source

Once the Wordpress demo site is up and running and you can access the backend, please open a Terminal in the my-site/wp-content/plugins/ directory and clone the repository here by using:

git clone https://github.com/assemblee-virtuelle/wpldp.git

You also have to get the submodules we use in this project by executing the two following commands

git submodule init
git submodule update

Those commands should launch the cloning of some projects in the /library/ folder.

Next step, getting the JSONEditor library we use. First, go to the library/js folder

cd library/js 'From the plugin directory

Then you can install the project using NPM or Bower:

npm install jsoneditor

or

bower install jsoneditor

Those commands should create a node_modules folder and download the jsoneditor library and its dependencies there.

Once it is done, you can then access the backend of your website, go to the 'Plugins' section, and activate the 'wpldp' plugin. If the activation does not send any error, you can move on to The first usage wiki page ;-)

Clone this wiki locally