Installation & Activation
Requirements Checklist
Before installing, confirm your environment meets these requirements:
- WordPress 5.0 or later
- PHP 7.4 or later (8.0+ recommended)
- MySQL 5.7+ or MariaDB 10.3+
- WordPress permalink structure set to Post name (not Plain)
- Site accessible over HTTPS — JWT tokens and the mobile app require a valid SSL certificate
-
mod_rewriteenabled (Apache) or equivalent rewrite rules (Nginx)
Installation
Option A — Upload via WordPress Admin (recommended)
- Download the plugin ZIP from the 2DC distribution channel
- In WordPress Admin, go to Plugins → Add New → Upload Plugin
- Choose the ZIP file and click Install Now
- After installation completes, click Activate Plugin
Option B — Manual FTP Upload
- Extract the ZIP file to get the
association-app-wp-plugin/folder - Upload the folder to
/wp-content/plugins/ - In WordPress Admin, go to Plugins → Installed Plugins
- Find 2DC Association App and click Activate
Option C — WP-CLI
wp plugin install /path/to/association-app-wp-plugin.zip --activate
Required Dependencies
The plugin uses afragen/wp-dependency-installer to automatically detect and install its required dependencies on first activation.
JWT Authentication for WP REST API
| Detail | Value |
|---|---|
| Plugin slug | jwt-authentication-for-wp-rest-api |
| Required version | Latest |
| Auto-installed | Yes — prompted on activation |
You must also add the following constants to your wp-config.php for JWT to work:
// wp-config.php — add above "That's all, stop editing!"
define('JWT_AUTH_SECRET_KEY', 'your-secret-key-here');
define('JWT_AUTH_CORS_ENABLE', true);
Generate a strong secret key using a password manager or:
openssl rand -base64 64
JWT_AUTH_SECRET_KEY must be a long, random string. Do not use a guessable value — it is used to sign all authentication tokens.
Permalink Configuration
The plugin replaces WordPress's default /wp-json/ REST prefix with /api/. This requires pretty permalinks to be active.
- Go to WordPress Admin → Settings → Permalinks
- Select Post name (e.g.
https://example.com/sample-post/) - Click Save Changes
This flushes the rewrite rules and registers the custom /api/v1/* route prefix.
To verify the API is reachable, visit in your browser:
https://your-site.com/api/v1/sync/ping
You should receive a JSON response (not a 404).
Nginx Configuration
If your server uses Nginx instead of Apache, add the following rewrite rule to your server block so WordPress can handle /api/* requests:
location /api/ {
try_files $uri $uri/ /index.php?$args;
}
Plugin Auto-Updates
The plugin uses yahnis-elsts/plugin-update-checker to check for updates from the 2DC update server.
When a new version is available, WordPress Admin will show the standard Update Now notice under Plugins → Installed Plugins. Updates are applied the same way as any other plugin.
Verifying Activation
After activation, confirm everything is working:
- Settings page visible — Go to WordPress Admin → Settings and look for Association App in the menu
- REST API accessible — Visit
https://your-site.com/api/v1/sync/ping— should return{"status":"ok"} - Custom post types registered — Go to WordPress Admin and look for App: Events, App: Conferences, App: Documents, App: Companies in the left sidebar
- User roles created — Go to Users → All Users → Change role to… and confirm
Association MemberandPending Reviewappear in the dropdown
Deactivation & Uninstallation
Deactivating the plugin disables all custom REST API endpoints and hides the custom post types. The data (posts, user meta, options) is preserved.
Deleting the plugin removes its files but does not automatically clean up:
wp_optionsentries (association settings, sync key, branding)- Custom post type posts (events, documents, companies, etc.)
- Custom user meta fields (member profile data)
- Custom user roles (
association-member,pending-review)
To perform a full clean uninstall, remove the above data manually via the database or a cleanup script before or after deleting the plugin.