-
Notifications
You must be signed in to change notification settings - Fork 0
Troubleshooting
gotowebpl edited this page Jan 15, 2026
·
1 revision
This page helps you diagnose and resolve common issues with ShadowORM.
Symptoms:
- White screen on activation
- PHP Fatal Error
Causes & Solutions:
| Cause | Solution |
|---|---|
| PHP version < 8.1 | Upgrade PHP to 8.1+ |
| Missing Composer dependencies | Run composer install
|
| Permission denied for db.php | Set write permissions on wp-content/
|
Debug Steps:
# Check PHP version
php -v
# Verify Composer dependencies
cd wp-content/plugins/shadow-orm
composer install --no-dev
# Check permissions
ls -la wp-content/Symptom:
ShadowORM requires MySQL 5.7 or higher. Current version: 5.6.x
Solution:
- Upgrade MySQL to 5.7+ or MariaDB 10.2+
- Contact your hosting provider for database upgrade
Symptoms:
-
wp shadow statusshows 0 migrated - Migration command succeeds but no data
Causes & Solutions:
| Cause | Solution |
|---|---|
| Table creation failed | Check MySQL user permissions |
| No posts to migrate | Verify posts exist for the type |
| Post type not supported | Add via shadow_orm_supported_types filter |
Debug Steps:
# Check what's happening
wp shadow migrate --type=post --dry-run
# Verify posts exist
wp post list --post_type=post --post_status=publish --format=countSymptoms:
- Updates to posts not reflected in shadow table
- Stale data returned
Causes & Solutions:
| Cause | Solution |
|---|---|
| Hooks not firing | Check for conflicting plugins |
| Shadow table doesn't exist | Run migration first |
| Post type not enabled | Enable in admin panel |
Debug Steps:
// Check if hooks are registered
add_action('save_post', function($id) {
error_log("save_post fired for: " . $id);
}, 1);
// Force sync
$syncService->syncPost($post_id);Symptoms:
-
get_post_meta()still hitting wp_postmeta - No performance improvement
Causes & Solutions:
| Cause | Solution |
|---|---|
| Post type not supported | Check supported types |
| Shadow table empty | Run migration |
| Cache poisoned | Clear and re-sync |
Debug Steps:
# Check if data exists in shadow table
wp db query "SELECT COUNT(*) FROM wp_app_shadow_post"
# Verify interception is working
wp eval "var_dump(get_post_meta(1));"Symptoms:
- Query times unchanged
- Same number of database queries
Causes & Solutions:
| Cause | Solution |
|---|---|
| Legacy driver in use | Upgrade to MySQL 8.0 |
| Missing indexes | Create indexes on frequently queried keys |
| Large JSON documents | Consider normalizing data |
Benchmarking:
# Run benchmark
wp shadow benchmark --type=product --iterations=100
# Compare with Query Monitor pluginTable 'wp_app_shadow_product' doesn't exist
Solution:
wp shadow migrate --type=productSymptom:
Cannot add or update a child row: foreign key constraint fails
Solution: Shadow tables don't use foreign keys by default. If you've added custom constraints, ensure referenced posts exist.
Symptom:
Malformed JSON in meta_data column
Solution:
# Re-sync affected post
wp eval "
require 'wp-content/plugins/shadow-orm/vendor/autoload.php';
\$syncService->syncPost(POST_ID);
"| Plugin | Issue | Workaround |
|---|---|---|
| Other caching plugins | May cache stale data | Clear cache after migration |
| Object caching (Redis/Memcached) | Separate cache layer | No conflict, works together |
| ACF (Free version) | Limited meta format | Works as expected |
// Check if another plugin hooks into get_post_metadata
global $wp_filter;
print_r($wp_filter['get_post_metadata']);Enable debug logging:
// In wp-config.php
define('SHADOW_ORM_DEBUG', true);
define('WP_DEBUG', true);
define('WP_DEBUG_LOG', true);Logs will appear in wp-content/debug.log.
If ShadowORM causes issues, restore to WordPress default:
# Remove all shadow tables
wp shadow rollback --type=post
wp shadow rollback --type=page
wp shadow rollback --type=product
# Deactivate plugin
wp plugin deactivate shadow-orm
# WordPress will resume using wp_postmetaIf data is corrupted:
# Drop existing tables
wp shadow rollback --type=product
# Re-migrate
wp shadow migrate --type=productIf WP-CLI doesn't work:
-- List shadow tables
SHOW TABLES LIKE '%shadow%';
-- Drop specific table
DROP TABLE wp_app_shadow_product;
DROP TABLE wp_app_shadow_product_lookup;
-- Delete db.php drop-in
-- Manually delete: wp-content/db.phpIf you can't resolve the issue:
- Check GitHub Issues: github.com/gotoweb/shadow-orm/issues
-
Open New Issue with:
- WordPress version
- PHP version
- MySQL version
- Error message/logs
- Steps to reproduce
- Email Support: kontakt@gotoweb.pl (Pro users)
High-performance ORM layer for WordPress/WooCommerce
- Home - Overview and features
- Installation - Setup instructions
- Getting Started - Quick start guide
- Configuration - Settings reference
- WP-CLI Commands - Command reference
- Architecture - Technical design
- How It Works - Internal workings
- API Reference - Developer API
- Troubleshooting - Problem solving
- FAQ - Common questions
Links