Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.


This is a quick guide for getting setup and started for development work on the UIO Wordpress Plugin.

Development Environment Setup

The quickest way to setup a development environment is to make use of a Vagrant VM. FLUID-6095 defines a task for setting up an automated vagrant environment, and includes a tar file that can be used for this in the interim. 

Setup the Vagrant VM

Unpack the qi-wordpress.tar.gz into the preferred location on the host machine. This will create a directory call "wordpress". The contents of this directory will be automatically synced to the VM when it is running. To launch the vagrant VM, run vagrant up from within the wordpress directory. This will start the VM and launch the Wordpress instance.

Code Block
languagebash
# unpack the tar file
tar -zxvf qi-wordpress.tar.gz


# open the wordpress directory it creates
cd wordpress


# launch the VM
vagrant up

Initial Wordpress Configuration

Once Wordpress has started, open localhost:10080/wp-adim in your browser. On the first time running Wordpress this will show its configuration wizard. Select your preferred language and create an admin user. You'll need this information for logging into Wordpress later. If through the configuration process you are asked for database information, just accept the defaults.

Adding the Plugin

You'll need to clone the uio-wordpress-plugin repo into the Wordpresses plugin directory. This will allow you to work on the plugin while it is deployed to the Wordpress instance.

Code Block
# change to the plugin directory
cd wordpress/wp-content/plugins/


# clone uio-wordpress-plugin repo
git clone https://github.com/fluid-project/uio-wordpress-plugin.git

Now that the plugin repo has been cloned into the plugins directory, you'll need to activate the plugin. Open localhost:10080/wp-admin in your browser. From the Dashboard, open the Plugins page. You should see a plugin called "User Interface Options", ensure that it is activated.