Is Optimal State safe to use on production sites?
Yes. The plugin includes multiple safety mechanisms: – Automatic safety backup before restore operations – Emergency rollback if anything goes wrong – Dry run mode for search & replace – Zero‑downtime restore using temp table swap – Database validation before restore – Confirmation dialogs for destructive actions
How does the emergency rollback work during a restore?
When you restore a backup, Optimal State first creates a safety backup of your current database. Then it uses a temporary table system: restored data goes into temporary tables first, validation is performed, and only after success are the tables atomically swapped (renamed) into place. If anything fails during the process – server crash, timeout, data corruption – the plugin automatically rolls back to the safety backup and puts your site back in maintenance‑free mode. This is handled by the OPTISTATE_Restore_Engine which uses MySQL atomic rename operations to ensure zero data loss. Even if the restore fails mid‑way, your original tables remain untouched with an optistate_old_ prefix, ready for manual recovery.
What happens if a restore process gets stuck or times out?
Optimal State uses a chunked restore system that processes large SQL files in manageable pieces. Each chunk runs within a set time limit and commits its changes. If a chunk times out, the system simply reschedules the next chunk to continue where it left off. The temporary table approach means that partial data never affects your live site. If the process gets completely stuck (e.g., server restarts), you can safely deactivate and reactivate the plugin – it will automatically detect the stalled restore and clean up any temporary tables. You’ll also see a “Restore stuck?” notice with clear instructions on how to abort safely.
What happens if a restore fails?
The system uses temporary table swap technology: 1. Data goes into temporary tables first 2. Validation check before going live 3. Atomic swap (old → backup, temp → live) 4. Emergency rollback if anything fails 5. Original tables remain untouched with optistate_old_ prefix
Can the plugin handle very large databases?
Absolutely. Optimal State is built with large‑database scenarios in mind:
- Backups are created in chunks, not all at once, so memory limits are never exhausted. The system adapts batch sizes based on your server’s memory and execution time ( OPTISTATE_Backup_Engine::get_adaptive_batch_limit ).
- Restores are also chunked; each chunk processes a limited number of SQL statements and commits them, preventing timeouts. For very large files, decompression is performed in streaming mode, reading and writing in small blocks.
- Cleanups use batch deletes (e.g., DELETE ... LIMIT 2000 ) with transaction commits between batches, so they don’t lock tables for long periods.
- The Process Store ( OPTISTATE_Process_Store ) manages long‑running tasks using advisory locks and expiration, ensuring that background workers don’t collide and that stale jobs are cleaned up.
Databases up to several gigabytes are fully supported. For extremely large sites (10GB+), we recommend using the Pro version which includes additional optimizations for large‑scale operations.
Will this plugin conflict with my caching plugin?
Compatible: Redis/Memcached, Cloudflare, BunnyCDN May conflict: WP Rocket, WP Super Cache, W3 Total Cache, Swift Performance
If you already use a caching plugin, simply disable Optimal State’s caching features (Server‑Side Page Caching and Browser Caching) and use it for database optimization, backups, and security features.
Does this work with WooCommerce?
Yes. Optimal State includes specialized WooCommerce optimization: – Expired session cleanup ( clean_woocommerce_bloat removes expired sessions and transients) – Action Scheduler log purging (removes completed, failed, canceled actions) – Order transient removal – Smart cache invalidation on order updates – Product index optimization (Pro)
Many WooCommerce stores see dramatic performance improvements after cleanup, especially if you have thousands of products or orders.
Can I migrate my site to a new domain with this?
Yes. Use the workflow: 1. Create backup on old site 2. Download the .sql.gz file 3. Install WordPress on new domain 4. Install Optimal State 5. Upload & restore the backup 6. Use Search & Replace to update URLs (it handles serialized data correctly) 7. Clear all caches
The Search & Replace feature includes a “Dry Run” mode so you can preview all changes before applying them.
What data does the cleanup remove?
20 types including: post revisions, auto‑drafts, spam comments, trashed comments, trashed posts, orphaned postmeta, orphaned commentmeta, orphaned usermeta, orphaned term relationships, duplicate postmeta, duplicate commentmeta, pingbacks, trackbacks, expired transients, all transients, action scheduler logs, oEmbed cache, WooCommerce sessions, empty taxonomies, and WooCommerce bloat.
How much space can I save?
New sites (<6 months): 5‑15% Medium sites (1‑3 years): 15‑35% Neglected sites (3+ years): 40‑70%
Does this work on managed WordPress hosting?
Yes, with some platform‑specific notes:
Full compatibility: SiteGround, Bluehost, HostGator, DreamHost, A2 Hosting, InMotion, most cPanel hosts
Database features only (disable page caching): WP Engine, Kinsta, Flywheel (use platform caching)
How does the page caching handle GDPR/cookie consent?
Optimal State’s server‑side caching automatically detects consent cookies from 20+ popular cookie plugins (CookieYes, Complianz, Cookie Notice, Borlabs, Real Cookie Banner, OneTrust, iubenda, etc.). Users with consent cookies see cached pages (fast). Users without consent cookies see fresh pages (privacy‑safe). You can also add custom consent cookie names if your site uses a less common solution. This is all handled by the OPTISTATE_Server_Caching class, which parses cookie headers and checks against known patterns.
Can I schedule automatic optimization?
Yes (Pro feature). You can schedule daily, weekly, or monthly optimization at any time (e.g., 2 AM). The system will create a backup, perform a full cleanup, and send you an email report. You can also choose “Backup Only” mode if you want to skip the cleanup part.
What is the Autoload Optimization feature and is it safe?
Autoloaded options are database entries that WordPress loads on every single page request. If these become too large (over 800KB), they significantly slow down your Time To First Byte (TTFB). Optimal State scans for large options that aren’t essential and safely changes their autoload setting to “no”. The feature automatically creates a backup of the original autoload status, so you can restore it instantly if anything breaks. The backup is stored in the optistate_core_data table and can be restored with a single click from the Advanced Tools panel.
Does the plugin support Two‑Factor Authentication?
Yes. Optimal State includes full TOTP‑based 2FA (time‑based one‑time passwords) compatible with Google Authenticator, Authy, and other apps. Each user can enable it from their profile page. The system generates backup codes that can be used if you lose access to your authenticator app. This is handled by the OPTISTATE_TwoFactor class, which uses secure encryption for secrets and hash‑based verification for backup codes.
How does the IP Number Blocker work?
The IP Blocker allows you to deny access to your entire site to specific IP addresses or CIDR ranges. Blocked IPs receive a 403 Forbidden response. You can block IPv4 and IPv6 addresses, as well as network ranges (e.g., 192.168.1.0/24 ). The block list is stored in the database and enforced via PHP (not just .htaccess), so it works on any server environment, including Nginx. The plugin also prevents you from accidentally blocking your own IP by warning you if your current IP is in the list.
Can I restrict plugin access to only certain administrators?
Yes. In the Settings tab, you can select which administrator accounts are allowed to use Optimal State. If no users are selected, all administrators have access. This is useful for agencies or large teams where you want to limit who can perform database‑sensitive operations. The access control is enforced on every admin page and AJAX request.
What support is available?
Free version: WordPress.org forums, built‑in user manual Pro version: Priority email support, advanced troubleshooting, migration guidance
Is my data sent to external servers?
No. All operations run locally on your server. The only exceptions are: – PageSpeed Insights – Only when you manually click “Run Audit”, your site URL is sent to Google’s API. This never happens automatically. – GTranslate widget – A translation widget loads from cdn.gtranslate.net to help non‑English speakers (cosmetic only, doesn’t affect functionality).
No usage statistics, analytics, or telemetry are collected.