WordPress

wp-content

wp-content is the WordPress directory that holds everything specific to your site: themes, plugins, uploads, and drop-in files. WordPress core files live outside it.

How it is measured

Typical contents are themes/, plugins/, uploads/, mu-plugins/, languages/, upgrade/, and drop-ins such as object-cache.php, advanced-cache.php, db.php, and maintenance.php. Each folder also has an index.php with Silence is golden. Constants like WP_CONTENT_DIR and WP_PLUGIN_DIR can relocate it.

Size it with du -sh wp-content/*. The folder is what you back up with the database; core can be downloaded again with wp core download.

Worked example

A hosted site hits a disk quota of 5 GB. du shows wp-content at 4.6 GB: uploads is 2.1 GB, a backup plugin's folder in wp-content/ai1wm-backups is 1.9 GB, and a cache folder is 0.4 GB. The theme and plugin code together are under 100 MB.

Deleting old backup archives from that folder and moving them off the server frees 1.8 GB. The owner points the backup plugin at remote storage.

How it differs

wp-content contains your changes, including the active theme and the plugin folders. wp-includes and wp-admin contain core, which should match the release byte for byte. A change inside wp-content is expected; a change to a core file means someone edited it or malware did.

Common errors

Editing core files instead of adding code to wp-content. Leaving backup archives inside a web-accessible folder. Forgetting that drop-ins load before plugins. Giving the web user write access to the whole folder. Deleting the upgrade folder during an update.

In practice

Run du on wp-content, find the largest subfolders, and move any backups out of the web root. Make theme and plugin folders read-only where your update process allows it, leaving uploads writable.

See also

Theme, Plugin, Uploads

Sources

Count this on a real site.

Watch my website