All of Vulnero's functionality lies in a single directory which is installed as a vendor library into a Zend Framework application. Typically it will be installed into a project sub-directory named something like library/Vulnero or vendors/Vulnero. Installing Vulnero as a standalone library works best if you have an existing Zend Framework application or would prefer to create your own application directories and setup.
If you'd prefer to have a working application out of the box, setup and ready-to-go with Vulnero installed, see: Installing the Sample Application.
Installation
- Clone the GitHub repository or add it as a sub-module if your project uses git. Example:
git clone --recursive git://github.com/andrew-kandels/vulnero.git Vulnero. - The directory from step 1 should be named
Vulnerofor auto-loading purposes and placed somewhere in your project's include_path. - Move the
wordpress-plugin.phpfile in the Vulnero directory to your project's root directory. Edit the file's header to update what WordPress sees for the plugin name, url and author information. - Update your application's Bootstrap class to extend Vulnero_Application_Bootstrap_Bootstrap (instead of Zend_Application_Bootstrap_Bootstrap). This class is what hooks into WordPress.
- You'll want to update your routes to use a white-list approach. You should not use Zend's default routes — default routes are what WordPress should handle.
- If you'd prefer to use your application's layouts (as opposed to WordPress as your layout) update your routes configuration to use
wordpress = false(see: routing). You'll want to disable (or use empty) layouts when rendering content through WordPress. - Login to the WordPress administration panel by browsing to
http://yourdomain.com/wp-admin. - Click the Settings link on the left side bar.
- Click Permalinks in the expanded Settings area.
- Make sure either Custom (with something like
/%postname%/) or Post Name are selected and save changes. - Click Plugins on the left side bar.
- Click the Activate link within the Vulnero section to activate the plugin.
- For a management tool within WordPress, you can copy the
application/admindirectory from the Vulnero sample project. A Vulnero link will then appear in the WordPress admin area on the left hand bar to configure your environment, cache and bootstrap resources. Alternatively, these can all be set in your application's config file (see the sample project's config for examples).
Summary
At this point, you have added Vulnero to your existing Zend_Application and should be up and running within your WordPress site.
