LaraDumps for WordPress
Enables LaraDumps debugging functionalities for your WordPress project
by Paulo Iankoski · github.com/pauloiankoski/laradumps-for-wordpress
Install
No release zip yet. The repository archive installs, but the folder name will carry the branch suffix and updates will not flow:
wp plugin install https://github.com/pauloiankoski/laradumps-for-wordpress/archive/refs/heads/main.zipA WordPress plugin that enables LaraDumps debugging functionalities for your WordPress project when WP_ENVIRONMENT_TYPE is set to 'local'.
Installation
-
The plugin is installed in the
wp-content/plugins/laradumps-for-wordpress/directory. -
Install the LaraDumps Core dependency by running Composer in the plugin directory:
cd wp-content/plugins/laradumps-for-wordpress/ composer install -
Activate the plugin through the WordPress admin interface.
Configuration
When the plugin is activated, it automatically creates a laradumps.yaml configuration file in the plugin directory with the following settings:
- workdir: Set to your WordPress root directory
- project_path: Set to the LaraDumps for WordPress plugin directory
- port: Default LaraDumps port (9191)
- host settings: Configured for local development
The configuration file is only created if it doesn't already exist, so your custom settings won't be overwritten.
Usage
The plugin automatically loads LaraDumps when:
WP_ENVIRONMENT_TYPEis set to 'local'- The Composer autoloader exists
- The LaraDumps Core class is available
Once loaded, you can use LaraDumps functions like ds() anywhere in your WordPress code for debugging.
Features
- Only loads in local environment (
WP_ENVIRONMENT_TYPE = 'local') - Safe loading with existence checks
- No performance impact in production or other environments
- Follows WordPress coding standards
Plugin Structure
The plugin is organized with the following structure:
laradumps-for-wordpress/
├── laradumps-for-wordpress.php # Main plugin file
├── includes/ # Organized functionality
│ ├── activation.php # Plugin activation hooks
│ └── core.php # Core LaraDumps functionality
├── composer.json # Composer dependencies
├── laradumps.yaml # LaraDumps configuration (auto-generated)
└── vendor/ # Composer dependencies
Requirements
- PHP 8.1+
- WordPress with
WP_ENVIRONMENT_TYPEset to 'local' - Composer for dependency management
Links
- Author: Paulo Iankoski
- License: GPL-2.0+
- LaraDumps: Official Documentation
Text Domain
The plugin uses the text domain laradumps-for-wordpress for translations. Language files should be placed in the /languages directory.