The Complete wp-config.php Performance Tuning Guide

The wp-config.php file is the control center of your WordPress installation. Most tutorials only cover database credentials, but this file holds the keys to significant performance improvements.

Memory Limits

define( 'WP_MEMORY_LIMIT', '256M' );
define( 'WP_MAX_MEMORY_LIMIT', '512M' );

WP_MEMORY_LIMIT applies to frontend requests. WP_MAX_MEMORY_LIMIT applies to admin tasks like updates and image processing. Set these based on your server capacity — going too high wastes memory, too low causes crashes.

Post Revisions

define( 'WP_POST_REVISIONS', 5 );

By default, WordPress saves unlimited revisions for every post. A post edited 100 times has 100 revisions in the database. Setting this to 5 keeps the safety net while preventing database bloat. Set to false to disable entirely.

Autosave Interval

define( 'AUTOSAVE_INTERVAL', 120 );

Default is 60 seconds. On busy sites with many simultaneous editors, frequent autosaves create database pressure. Increase to 120 or 180 seconds unless you have editors who frequently lose work.

Trash Management

define( 'EMPTY_TRASH_DAYS', 7 );

Default is 30 days. Trashed posts still sit in the database and show up in queries. Reduce this for sites that delete content frequently.

Disable Cron on Page Load

define( 'DISABLE_WP_CRON', true );

WordPress runs cron tasks on page load by default. This adds latency for the unlucky visitor who triggers it. Disable this and set up a real server cron job instead:

*/5 * * * * curl -s https://yoursite.com/wp-cron.php > /dev/null 2>&1

Concatenate Admin Scripts

define( 'CONCATENATE_SCRIPTS', true );

This combines admin JavaScript files into fewer HTTP requests. Disable it if you experience admin JavaScript errors.

File Edit Permissions

define( 'DISALLOW_FILE_EDIT', true );

This disables the theme and plugin editor in wp-admin. It is primarily a security measure, but it also prevents accidental edits that could crash your site.

Managing All This Without SQL

Editing wp-config.php manually works, but one typo can take your site down. WP Multitool provides a visual interface for managing wp-config.php performance settings, with automatic backups before each change and one-click rollback if something goes wrong.

These settings are small individually, but combined they reduce database size, lower memory usage, and eliminate unnecessary processing on every request.

Get WordPress Performance Tips

Join developers and agency owners who get backend optimization strategies, tool releases, and deep-dive guides.

No spam. Unsubscribe anytime. We respect your privacy.