Understanding the WordPress Folder Structure: wp-content, wp-config, and Friends

Sketsa pohon folder WordPress: wp-admin, wp-includes, wp-config.php, dan wp-content berisi themes, plugins, uploads

Written by

in

Quick Summary
  • The WordPress folder structure consists of core directories like wp-admin and wp-includes which should not be modified because they will be overwritten during system updates.
  • The wp-content folder is the main area for site owners containing themes, plugins, and all uploaded files like photos and documents.
  • Important files like wp-config.php and .htaccess manage database connections and server configurations which require high caution when edited.

At some point, you will need to open the File Manager or FTP: to install a manual plugin, fix an error, or move a site. To avoid confusion and accidental deletion, get to know the WordPress folder map first.

WordPress folder tree sketch: wp-admin, wp-includes, wp-config.php, and wp-content containing themes, plugins, uploads

Contents of the main folder

  • wp-admin/: the dashboard engine. Do not modify.
  • wp-includes/: core WordPress functions. Do not modify.
  • wp-content/: your part. This is where your themes, plugins, and uploads live.
  • wp-config.php: contains database access and several important settings.
  • .htaccess: server rules (on Apache), such as for permalinks and redirects.

The wp-admin and wp-includes folders are overwritten every time WordPress is updated. Therefore, any changes made there will be lost and risk breaking the site.

Inside wp-content

  • themes/: all installed themes.
  • plugins/: all installed plugins.
  • uploads/: photos and files you upload, usually organized by year and month.

If the site errors out due to a plugin and the dashboard cannot be opened, rename that plugin folder (for example, to plugin-name-off) via the File Manager. WordPress will deactivate it and the site often returns to normal.

wp-config.php: handle with care, but useful

This file contains sensitive data, so do not share it. One useful setting is debug mode, to find the cause of an error without displaying it to visitors:

define( 'WP_DEBUG', true );
define( 'WP_DEBUG_LOG', true );
define( 'WP_DEBUG_DISPLAY', false );

Error messages will be written to the wp-content/debug.log file. Once the issue is found, change WP_DEBUG back to false.

Golden rules before changing anything

  1. Back up your files and database first.
  2. Change one thing at a time.
  3. Do not edit WordPress core files.
  4. For visual changes, use a child theme (we will discuss this in the next article).

File permissions

On most hosting, safe general settings are 755 for folders and 644 for files. Do not set permissions to 777 just to make sure “it will definitely work”, as that opens up a security loophole.

Frequently Asked Questions

What are the main folders you should avoid modifying in the wordpress folder structure?

You should never modify the wp-admin and wp-includes folders. These contain the core dashboard engine and system functions, and they are completely overwritten every time WordPress is updated, which would erase your changes and risk breaking your site.

Where are your website files, themes, and uploaded media stored?

Everything you add to your site lives inside the wp-content folder. This directory contains subfolders for all your installed themes, active plugins, and media uploads, which are typically organized neatly by the year and month they were uploaded.

How can you fix a broken site caused by a problematic plugin via the file manager?

If a plugin error locks you out of the dashboard, open your file manager and navigate to wp-content/plugins. Simply rename the folder of the faulty plugin to temporarily deactivate it, which often restores normal site access.

What is the proper way to configure file permissions for your website?

For optimal security, use 755 for folders and 644 for files on most hosting servers. Never set your permissions to 777 just to ensure functionality, as this creates a serious security loophole that exposes your site to risks.

What are the golden rules before making changes to your site files?

Always back up both your files and database first, change only one thing at a time, never edit core files, and use a child theme for visual adjustments to ensure your site remains stable and secure.