Skip to content

What Is the WordPress File Structure and How Do You Set Permissions Safely?

Inside your site's folder are three major directories and a handful of root files, each with a different role. wp-admin and wp-includes are the core, replaced entirely with every update, so any edit there is lost, while wp-content alone holds what is truly yours: your themes, plugins and media. This guide breaks the structure down file by file and explains 755 and 644 permissions, 640 for wp-config, and why 777 is a mistake with no justification.

WordPressسارة خليل39 min read
Illustration of a folder tree with files, a padlocked file and permission blocks, representing site file structure and permissions
On this page

The first time you open the file manager and enter your site's folder, the list is a shock: dozens of files with cryptic names that all start with wp-, and folders where you can't tell which matter and which you can do without. Most beginners' first instinct is one of two things: either leave immediately and touch nothing, or get overconfident and delete whatever looks unnecessary. Both are costly.

The truth is that this apparent chaos is actually very well organized. WordPress follows a strict logic in how it lays out its files, and once you understand that logic, the scary list turns into a clear map where you know where everything is: where the theme you are editing lives, where the image you upload goes, which file you must back up, and which file you can delete and re-download in two minutes.

There is an even stronger practical reason to learn this: you will need this knowledge the day your site breaks. When the dashboard crashes and you can't log in, only direct access to the files will save you, and then you need to know exactly which folder to open and which file to rename. Anyone who doesn't know the structure at that moment tries things at random and usually makes matters worse.

The second part of the story, and the most neglected in Arabic content, is permissions. A small number like 644 or 755 determines who can read your file, who can write to it and who can execute it. Set it too strictly and image uploads and updates break; set it too loosely and you open a door for attackers. In this guide we first walk through the entire structure, then dig into permissions in practical detail: the right number for everything, how to fix it with a single command, and why the number sometimes misleads you, because the real problem lies in the owner, not the permission.

Where does your site actually live on the server?

Before we get into the files, we need to agree on the starting point: the root (Document Root), the folder the server serves when someone visits your domain name.

On most shared hosting that runs cPanel, this folder is named public_html. On some other panels it may be httpdocs, www or htdocs. On a server you manage yourself, it may be a path such as /var/www/example.com/public. The name varies, but the role is the same: everything inside it is available to the world through the browser, and everything outside it is not. If you don't yet know how to reach this folder in the first place, start with the beginner's guide to cPanel, which explains the file manager step by step, or with uploading files via FTP with FileZilla if you prefer to work directly from your computer.

Here is an important distinction that confuses beginners: is WordPress installed directly in the root or inside a subfolder? If you installed it in the root, you will find wp-admin, wp-includes and wp-content directly inside public_html, and your site URL will be example.com. If you installed it inside a subfolder such as public_html/blog, you will find them there, and your URL will be example.com/blog. Neither case is wrong, but knowing which one you have determines the path you write in any technical tutorial you read later, and also where to look for files whenever there is a problem.

The general layout of a clean installation looks like this:

text
public_html/
├── wp-admin/            ← core: the dashboard (do not edit)
├── wp-includes/         ← core: WordPress libraries (do not edit)
├── wp-content/          ← your own files
│   ├── themes/
│   ├── plugins/
│   ├── uploads/
│   ├── mu-plugins/      ← may not exist by default
│   ├── languages/
│   └── upgrade/         ← temporary during updates
├── wp-config.php        ← connection settings and security keys
├── .htaccess            ← server rules (Apache / LiteSpeed)
├── index.php
├── wp-load.php
├── wp-settings.php
├── wp-login.php
├── xmlrpc.php
└── ... the rest of the core files

Notice that the three major folders always appear at the top, and that the root files are scattered among them with names that almost all start with wp-. This arrangement is not a cosmetic detail; it is a map of responsibilities: who gets to edit what.

WordPress file tree and permissionsRoot: public_htmlwp-adminCore · don't touchwp-includesCore · don't touchwp-contentyour own filesthemesThemespluginsPluginsuploadsUploaded mediamu-pluginsMust-use, can't be disabledPermissions: folders 755 · files 644 · wp-config 640And 777 is a serious security mistake: never use itCore is replaced with every update · only wp-content is yours
The WordPress folder structure: wp-admin and wp-includes are core files replaced with every update, so don't edit them; wp-content alone is yours (themes, plugins and media); the standard permissions are 755 for folders, 644 for files and 640 for wp-config.php, and 777 is never used.

Root files: what does each one do?

The root files are the first thing you see and the most dangerous to tamper with. Most are core files you never need to touch, but two of them, wp-config.php and .htaccess, are the exception: they are your own files, and updates won't touch them.

FileWhat it doesDo you edit it?
wp-config.phpDatabase connection details, security keys (SALTs), table prefix, configuration constantsYes: it's your file, and updates don't touch it
.htaccessServer rules on Apache/LiteSpeed: permalinks, redirects, protectionYes: carefully, with a backup
index.phpThe entry point: every request passes through here and then loads WordPressNo: core
wp-load.phpLoads the full WordPress environment (developers use it for access from an external script)No: core
wp-settings.phpBootstraps the core: loads functions, plugins and the theme in a set orderNo: core
wp-login.phpThe login, registration and password recovery pageNo: core
wp-cron.phpRuns scheduled tasks when the site is visited (WP-Cron)No: core
xmlrpc.phpA legacy interface for remote publishing; a common target for brute-force attacksNo: core (but often disabled)
wp-activate.php · wp-signup.phpAccount activation and signup (used mainly in multisite networks)No: core
readme.html · license.txtDocumentation and license files; they sometimes reveal the version numberNo (can be safely deleted)
robots.txtDirectives for search engine crawlers (may be a real file or generated by WordPress by default)Yes, if it's a real file

wp-config.php: the most sensitive file on your site

If your site has a "heart", this file is it. Inside are the database name, its user and its password in plain text, plus eight random encryption keys (SALTs) used to secure session cookies, the database table prefix, and any configuration constants you add later, such as disabling the file editor or setting the memory limit.

The direct consequence: whoever can read this file owns your database. That is why it deserves special treatment when it comes to permissions; we will come back to it in detail shortly. And an important point that is often overlooked: some hosts move this file one level above the root (outside public_html), because WordPress automatically looks for it in the parent folder if it doesn't find it. This is a safer arrangement, because the file is then completely out of the browser's reach.

A practical rule: never edit this file without a backup copy of it on your computer. A missing semicolon or an extra space after the closing tag is enough to bring the whole site down with a white screen.

.htaccess: the file that appears and disappears

If your server runs Apache or LiteSpeed, you will find a file named .htaccess in the root. The dot at the start of the name makes it hidden by default, which is why many people swear it doesn't exist, then find it as soon as they enable the "Show hidden files" option in the file manager or FTP client.

WordPress automatically writes a small block into it, wrapped in the # BEGIN WordPress and # END WordPress comments, whose job is to route all requests to index.php so that pretty permalinks work. Anything you write outside this block stays as it is, while anything you write inside it may be erased when the permalinks are saved again.

Its uses go far beyond links: redirects, forcing HTTPS, blocking access to specific files, enabling compression and browser caching. Because the topic is broad in its own right, you will find its rules in full, with examples, in the complete guide to the htaccess file. All that matters here: it is your file, not a core file, and no update will touch it. If your server runs Nginx, you won't find this file at all: the rules are written directly in the server configuration, and you can't edit them on shared hosting.

The three major folders: who gets to edit what?

This is the golden rule that sums up half the article: WordPress strictly separates its own files from your files. The separation is not just organizational; it is what makes automatic updates possible in the first place.

FolderWhat it containsWho owns itWhat happens on update?Do you edit it?
wp-adminAll the dashboard files: screens, styles, scriptsWordPress coreReplaced entirelyNo, never
wp-includesCore libraries and functions: queries, users, templates, jQueryWordPress coreReplaced entirelyNo, never
wp-contentThemes, plugins, uploaded media, translationsYouStays as it is, untouchedYes, this is where you work

wp-admin: the dashboard's kitchen

Everything you see after logging in (the posts list, the settings screen, the media manager, the plugin editor) lives here. This folder is the code embodiment of what we explain conceptually in the wp-admin definition in the wiki.

The crucial point: there is no legitimate reason to edit a file inside wp-admin. If you read a tutorial that tells you to, the tutorial is outdated or wrong. WordPress provides official hooks and filters to change how the dashboard behaves from inside a small plugin or the child theme's functions.php file. Those changes survive updates, whereas your direct edit is wiped out by the first security update.

There is also a security angle: editing a core file makes your site fail file integrity checks, and it makes it harder for any scanning tool to tell your own edit apart from an attacker's injected malicious code. Many sites discovered they had been hacked late because their owners got used to seeing "modified core files" in reports and ignored them.

wp-includes: the WordPress engine

If wp-admin is the interface, wp-includes is the engine. This is where the functions that every theme and every plugin call live: database handling, query building, user and role management, link generation, and the hook system itself. This is also where the JavaScript libraries that WordPress ships with, such as jQuery, live.

The same rule applies to the letter: don't edit it, don't delete files from it, don't add files to it. The whole folder is replaced with every update. If you find a file with strange names or a recently modified file in it, you most likely have a security problem, not a customization, and it is one of the first places to check when you are suspicious.

What is a WordPress site made of?ThemeDesign and layoutPluginsFunctions and featuresWordPress coreThe open-source software that runs the siteHosting: server + PHP+ MySQL database (your content)The theme and plugins build on the core, and the core runs on the hosting
A WordPress site consists of an open-source core running on hosting (server + PHP + MySQL database), with the theme (the design) and plugins (the functionality) built on top of it.

Inside wp-content: the only folder that is yours

Now we get to the most important part in practice. Everything you have built, installed and uploaded is here, and none of it comes with WordPress by default except one theme and a plugin or two.

SubfolderWhat's insidePresent by default?Critical note
themes/A folder for each installed theme (active or not)YesDeleting the active theme's folder breaks the site immediately
plugins/A folder for each installed pluginYesRenaming a plugin's folder = forcibly deactivating it
uploads/Everything you have uploaded, images and files, organized by year/month by defaultCreated on the first uploadUsually the heaviest folder on the site
mu-plugins/"Must-use" plugins that run automaticallyNo: you or your host creates itCan't be disabled from the dashboard at all
languages/Translation files .mo, .po and .l10n.phpCreated when a language is installedIncludes translations for core, themes and plugins
upgrade/A temporary workspace during updatesCreated on the first updateMust be writable
cache/Cache files created by speed-optimization pluginsNo: depends on the pluginSafe to delete; it gets rebuilt
index.php (empty)A protection file that prevents directory listingYesDon't delete it
debug.logThe error log when debug mode is enabledNoDangerous if left unprotected

themes: your themes

Each theme lives in a folder named after it inside themes. You can keep ten themes installed and only one active, but it is better to delete what you don't use: an inactive theme is still a file on the server that needs security updates, and ignoring them leaves a dormant vulnerability. The rule of thumb: keep the active theme plus one default theme as an emergency fallback, and delete the rest. If you haven't settled on a choice yet, the guide to choosing the right WordPress theme helps you decide before you fill the folder with experiments.

The most important point here: don't edit theme files directly if it is a theme you receive updates for. A theme update replaces its files just as a core update does, wiping out your changes. The right solution is a child theme: a small, independent folder that inherits everything from the parent theme and contains only what you have changed. That way your customization survives every update.

plugins: your plugins

Same logic: one folder per plugin. And here lies the best-known rescue trick in the WordPress world: renaming a plugin's folder deactivates it immediately. If your site crashes after a plugin update and the dashboard no longer opens, you go in through the file manager or FTP and rename the suspect plugin's folder (for example, from some-plugin to some-plugin-off). WordPress can't find it, deactivates it automatically, and the site comes back. If you want to deactivate all plugins at once, rename the plugins folder itself. This trick and others are explained in detail in the guide to fixing common WordPress errors.

A reminder: every plugin is extra code that runs on every request, and every plugin is extra attack surface. Choose sparingly; the list of essential plugins for any site is a better starting point than installing everything you see in search results.

uploads: the media library

Every image you upload from the dashboard lands here, organized by default into folders like 2026/07. Because WordPress generates several sizes of each image (thumbnail, medium, large, and any sizes your theme requests), a single image can produce six or more actual files. That explains why uploads becomes by far the heaviest folder on the site, and why the file count eats into your quota on shared hosting faster than you expect. Compressing images before uploading saves double the space for exactly this reason.

A fundamental security point: uploads is the only folder that must always be writable by the server, and that is exactly what makes it the first target for any attacker. The classic scenario: the attacker exploits a vulnerability in a plugin to upload a malicious PHP file into uploads, then calls it from the browser and it gets executed. The well-known prevention is to block PHP execution inside wp-content/uploads with a rule in the htaccess file or in the server configuration, a two-line measure that shuts down an entire class of attacks.

mu-plugins: must-use plugins

The folder name is short for "Must-Use Plugins", and WordPress doesn't create it by default: either you create it or your host does. Two things make it fundamentally different from the regular plugins folder:

First: any PHP file placed in it runs automatically without activation. It has no "Activate" button, and it loads before regular plugins.

Second, and most important: it cannot be disabled from the dashboard at all. It appears in a separate tab called "Must-Use", but with no Deactivate or Delete button. The only way to stop it is to delete the file from the server.

That makes it a double-edged sword. It is very useful for developers and hosts who want to enforce a setting the customer can't disable by mistake. And it is very dangerous because attackers know about it: a backdoor planted inside mu-plugins runs on every request, doesn't appear in the usual plugin list and can't be disabled from the dashboard. That is why this folder should be among the first things you check when you suspect a problem. One last technical note: WordPress reads PHP files at the top level only of mu-plugins and doesn't go into subfolders, so if your plugin is a whole folder, you need a small loader file at the top level that calls it.

languages and upgrade

The languages folder contains the translation files: core translations at its top level, plugin translations in languages/plugins and theme translations in languages/themes. You don't need to touch it unless you are correcting a translation yourself; WordPress manages it automatically when you change the site language in the settings.

The upgrade folder is a temporary workspace: when WordPress updates itself or a plugin, it downloads the package and unpacks it here before moving it into place. Normally it is almost empty. If you find it full of old folders, that is the trace of updates that failed halfway, and deleting its contents is completely safe. More importantly, if this folder isn't writable, all automatic updates will fail without a clear message. Deleting the folder itself is also safe, because WordPress recreates it when needed, provided it has permission to do so.

What you may touch and what you may not

Now we can sum up everything above in a single, actionable rule: if a file will be replaced on update, don't edit it; if it won't be replaced, it is your responsibility.

All the decisions flow from this rule:

Want to change how the site looks? Don't touch the parent theme's files. Create a child theme and put your changes in it. The full details are in how to customize a WordPress theme.

Want to add a small piece of functionality in code? Put it in the child theme's functions.php, or, better for functions unrelated to design, in a small plugin of your own. Why better? Because a function you write in the theme disappears the day you change themes, while a plugin stays.

Want to disable something in the dashboard? Use a hook, not an edit in wp-admin.

Want to change the behavior of a plugin you bought? Don't edit its files; the next update will erase your work. Look for a hook the plugin provides, or contact its developer.

And before any serious change on a live site, try it on a separate staging copy. Most reputable hosting plans today offer a single button that creates a complete test copy for you, turning scary changes into an experiment with no risk to visitors.

Permissions: what do 644 and 755 actually mean?

Now we get to the part that scares everyone for no reason. It is much simpler than it looks once you understand the logic of the numbers.

Every file and folder on a Linux server has three categories of "people":

  • Owner (User): the account that owns the file.
  • Group: a group of accounts that share common treatment.
  • Others: any other account on the server, including processes that aren't yours.

Each category has three possible permissions: read (r) = 4, write (w) = 2, execute (x) = 1. You add up the numbers to get one digit per category, and line up the three digits in order: owner, then group, then others.

NumberPermissionsIn lettersMeaning
7Read + write + executerwxFull control
6Read + writerw-Reads and modifies, doesn't execute
5Read + executer-xReads and enters the folder, doesn't modify
4Read onlyr--Reads only
0Nothing---Completely denied

So 644 means: the owner reads and writes (6), the group reads (4), and others read (4). And 755 means: the owner can do everything (7), the group reads and executes (5), and so do others (5).

A question that confuses beginners: why do folders need "execute" permission at all? Because "execute" means something different on a folder: it is the permission to enter the folder and access what is inside. A folder with 644 permissions (no execute) can't be entered at all, and you will get a 403 error on everything inside it. That is the reason for the well-known rule: folders 755 and files 644, not the other way around and not mixed up.

ItemRecommended permissionStricter alternativeNote
All folders755750 on a private server755 is the safe default
All files644640 on a private serverIncludes core and theme files
wp-config.php640600The single most important tightening
.htaccess644604Some servers complain about 604
wp-content/755—Don't tighten it further
wp-content/uploads/755—Must be writable
wp-content/upgrade/755—Essential for updates to succeed
The public_html folder itself755—750 may break the server
Anything at all777—No. Never. Under any circumstances.

Why 640 for wp-config.php? Because the number means: the owner reads and writes, the group reads, and others get nothing. On a shared server hosting hundreds of accounts, this prevents any other account on the same server from reading your database password. Some server setups don't accept this tightening and respond with a 500 error. If that happens, set it back to 644, and try 600 if PHP runs directly as your user.

How do you fix permissions all at once?

In the file manager or FileZilla you can change permissions with the mouse, which is enough for a file or two. But to correct an entire site you need the command line over SSH; if that is new to you, start with SSH basics for beginners.

The two correct commands, run from inside the site's folder:

bash
# First go to the site root; check with pwd before anything else
cd ~/public_html
pwd

# All folders to 755
find . -type d -exec chmod 755 {} \;

# All files to 644
find . -type f -exec chmod 644 {} \;

# Then tighten the config file on its own
chmod 640 wp-config.php

The dot . at the start of the command means "the current folder and everything inside it". And here is the most dangerous mistake possible in this entire article: running these two commands in the wrong folder. If you run them in your home folder ~, for example, you will change the permissions of sensitive configuration files outside the site, and you may break SSH access to the server, because the .ssh folder and the authorized_keys file have very strict permissions (700 and 600) that SSH refuses to work without. Run pwd every time beforehand and make sure the output is exactly your site's path.

A faster version for large sites uses + instead of \;, so chmod runs once per batch instead of once per file:

bash
find . -type d -exec chmod 755 {} +
find . -type f -exec chmod 644 {} +

And to view the current state before making changes:

bash
# Show permissions and owner for the folder's contents
ls -la

# Find anything with 777 permissions on the site
find . -perm 0777

Owner and group: the real reason behind most problems

Here is the part missing from 90% of tutorials, and the reason so many people are puzzled: I set every permission to exactly 755 and 644, and WordPress still can't upload or update.

The reason is that the numeric permission is only half the equation. The other half is: who is the owner? When WordPress tries to write a file, what actually does the writing is the PHP process the server runs as a particular user. If the file is owned by a user other than the PHP user, WordPress falls into the "others" category, and "others" have no write permission under 644. The result: a silent failure, with permissions that look perfect on paper.

This problem is rare on well-managed shared hosting, because the host sets ownership automatically. It is very common on a server you manage yourself: you copy the files over SSH as root or as your personal user, while the web server runs as a user such as www-data. The result: everything looks right and everything is broken.

The cure is to fix the ownership, not to raise the number:

bash
# Example: make the web server user www-data own the site files
sudo chown -R www-data:www-data /var/www/example.com

# To find out which user the web server actually runs as
ps aux | grep -E 'apache|nginx|php-fpm' | head

Warning: don't run chown blindly on shared hosting. You usually won't have the permission at all, and if you do, you may break the account. The user name differs between systems (www-data on Debian and Ubuntu, apache or nginx on Rocky and related Linux distributions, and your own account name on per-user isolated PHP-FPM setups). Check first, then run it.

Troubleshooting: symptoms of wrong permissions and how to fix them

These are the four most common symptoms in the real world, and how to tell them apart quickly.

SymptomMost likely causeQuick checkFix
Image uploads fail / "Failed to write file to disk"uploads isn't writable, its ownership is wrong, or the quota is fulluploads permissions and account space755 on uploads + fix the owner + free up space
"Could not create directory" when updating a pluginupgrade or plugins isn't writablePermissions on wp-content/upgrade755 on it, or delete it so it's recreated
403 Forbidden error on the whole siteA folder without execute (entry) permissionPermissions on public_html and the parent folders755 on all folders
403 on a single page onlyA rule in .htaccess or a firewallThe latest change to .htaccessRename it temporarily and test
WordPress asks for FTP credentials during installsFile ownership doesn't match the web server userCompare the file owner with the PHP userchown to the web server user
White screen after editing a fileA PHP syntax error, not permissionsThe last file you editedRestore the previous version
500 error after tightening wp-config.phpThe server doesn't accept 600/640Try 644Go back to 644

Image uploads fail

The usual message: "Failed to write file to disk" or "The specified directory is not writable". There are three possibilities, in order: (1) the uploads folder has permissions lower than 755; (2) its ownership doesn't match the web server user, which is the most common case on private servers; (3) the account's disk space or file-count quota is full, a case that is often misdiagnosed because the same message appears. Always start by checking space before you tamper with permissions: df -h on your server, or the disk usage indicator in the control panel.

A fourth, less common possibility: the upload folder path has been set manually to a wrong path in the WordPress settings or via a constant in wp-config.php. This usually happens after moving a site between two servers.

Plugins or core can't be updated

The symptoms: a "Could not create directory" message, a frozen progress bar, or a return to the page with nothing changed. The prime suspect is wp-content/upgrade: it is either missing, not writable, or full of leftovers from earlier failed updates. The quickest fix: delete all its contents, make sure its permission is 755 and its ownership is correct, then try again. If the folder doesn't exist, create it manually with the same permission.

And remember that postponing updates is not a safe option: most WordPress hacks happen through outdated plugins with known, publicly disclosed vulnerabilities that attackers know about before you do. Fixing the update problem is a priority, not a luxury to put off.

403 Forbidden error

The decisive distinction: does it appear on the whole site or on a single page?

If it appears on the whole site, the cause is usually a folder without entry permission: check the permissions of public_html itself and of every folder above it in the path. Sometimes the cause is simpler: the index.php file is missing from the root while the server doesn't allow directory listing.

If it appears on only one page or path, the permissions are most likely innocent, and the cause is a rule in .htaccess, a security plugin or a WAF blocking a specific pattern in the URL. The decisive test: temporarily rename .htaccess to .htaccess.bak and test. If the error disappears, the cause is inside the file. Restore the name right after the test and save the permalinks again.

WordPress asks for FTP credentials when installing a plugin

This particular symptom is almost conclusive proof of an ownership problem, not a permissions problem. What happens: WordPress tries to write directly, fails, assumes it has no access to the file system, and shows you the FTP credentials form as a fallback so it can write through that instead.

The right fix is to correct the file ownership to match the web server user, as explained above. The form then disappears for good, because WordPress will detect that it can write directly.

The common wrong fix, which you will find in half the search results, is adding define('FS_METHOD', 'direct'); to wp-config.php. It fixes nothing; instead, it forces WordPress to try writing directly even though that fails, turning an annoying prompt into a silent error that is harder to diagnose. Use it only after you have actually fixed the ownership and confirmed that writing works.

And the worst fix of all: setting 777 on wp-content so the installation works. Yes, it may work, and yes, you will pay the price later.

What to back up and what you can ignore

Understanding the structure saves you space and time on backups, because roughly half the files on your site can be downloaded again for free at any moment.

ItemBack up?Why
wp-content/uploadsYes: mandatoryCan't be recovered from anywhere else
wp-content/themesYesEspecially the child theme and any custom changes
wp-content/pluginsYesIncludes paid plugins and their file-based settings
wp-config.phpYes: mandatoryCan't be regenerated (keys and connection details)
.htaccessYesYour custom rules are lost if it goes missing
The databaseYes: mandatoryAll posts, pages, settings and comments
wp-adminNoDownloadable from WordPress for free in two minutes
wp-includesNoSame reason
Core files in the rootNoSame reason
wp-content/upgradeNoEntirely temporary
wp-content/cacheNoRebuilt automatically, and bloats the backup size for no benefit
debug.logNoA temporary log, and better deleted altogether

The bottom line in one sentence: wp-content + wp-config.php + the database = your entire site. Everything else is core files you can download from WordPress at any time. This noticeably shrinks your backup and speeds up restoring it. The backup strategy itself (how often, where to store it and how to test a restore) is a separate topic we cover in the complete guide to WordPress backups.

Five recurring mistakes to avoid

Editing a core file "just this once". There is no "just once". The edit is lost in the first update, then you redo it, then you forget it, then you wonder why the old behavior comes back every month.

Deleting folders to save space. Deleting wp-includes or the folder of an active theme brings the site down immediately. If space is tight, start by compressing images and cleaning out old backups, upgrade and cache, not core files.

Uploading files outside public_html and waiting for them to appear. A file that isn't inside the root is never seen by the browser, no matter how long you wait or how often you refresh the page.

Using the dashboard's built-in file editor for a risky edit. A single syntax error there brings the site down, and you may lose the ability to get in and fix it because the editor itself lives inside the dashboard. Disable this editor completely; it is also one of the first things an attacker who has gained an admin account exploits, as we detail in the guide to securing a WordPress site.

Forgetting hidden files when migrating. When moving a site between two hosts, many people forget .htaccess because it is hidden by default, and permalinks and redirects break on the new site. Enable "Show hidden files" before any migration.

Frequently asked questions

Can I delete the wp-includes folder to save space?

Absolutely not. wp-includes contains the core libraries and functions WordPress calls on every request, and deleting it immediately takes the site down with a fatal error. It is only a few megabytes and adds almost no weight compared with the uploads folder, which usually accounts for more than 90% of a site's size. If you are looking for space, start by compressing images and deleting unused image sizes, clearing leftovers in wp-content/upgrade and cache, and deleting inactive themes and plugins. Those are real, safe sources of space.

What exactly is the correct permission for wp-config.php?

The recommended value is 640: the owner can read and write, the group can read, and others get nothing. On a private server you fully control, you can tighten it to 600, which shuts out even the group. The goal is the same: prevent any other account on the server from reading your database connection details. Some hosting setups don't accept this tightening and respond with a 500 error when the site is opened. If that happens, set the file back to 644 immediately and ask support what limit their setup allows instead of trying numbers at random.

Why can't I find the mu-plugins folder on my site?

Because WordPress doesn't create it by default. The folder is entirely optional and only appears if you, your host or a plugin that needs it creates it. Its absence is not a problem or a sign of an incomplete installation. If you want to use it, create it yourself inside wp-content with 755 permissions and put a PHP file at its top level; it will run automatically without activation. But remember the crucial rule: whatever you put there cannot be disabled from the dashboard at all, and the only way to stop it is to delete the file directly from the server.

Is 777 safe if I only use it temporarily and then change it back?

No. "Temporarily" is a stretchy word in practice: automated scans looking for writable folders run around the clock, and a window of a few minutes is enough. Worse, most people genuinely forget to change it back, so 777 stays for months. And even if you are disciplined, the fix itself is wrong: if uploads don't work with 755, the problem is file ownership (user/group), not the number, and raising the number hides the symptom without treating the cause. Correct the ownership with chown or ask support to do it, and 755 will work without any problem.

What is the difference between editing theme files and editing core files?

Both are lost on update, but the fix differs. Editing core files (wp-admin and wp-includes) is never justified: the right alternative is always a hook or filter inside a small plugin. Editing theme files, on the other hand, is a perfectly legitimate need, and the right solution is a child theme, which inherits everything from the parent theme and keeps your changes in a separate folder that updates don't touch. The general rule: design customizations go in the child theme, and functionality customizations go in a plugin of your own.

A debug.log file appeared in wp-content. Should I delete it?

Yes, delete it after you read what's in it. Its presence means debug mode is enabled in wp-config.php, which is useful while diagnosing a problem but shouldn't stay enabled on a live site. The reason is that the file sits inside a web-accessible folder and can be read from outside just by typing its path, and it reveals server paths, file names and sometimes query details. Turn debugging off in wp-config.php first, then delete the file. If you need to keep it temporarily, block access to it with a server-level rule.

How can I tell if a file on my site is suspicious or malicious?

Four indicators together are stronger than any one alone: a recent modification date on a file you haven't touched; a PHP file in a place it doesn't belong, such as wp-content/uploads or the year folders; a random name or one that imitates core names, such as wp-cache-x1.php in the root; and compressed or obfuscated content that starts with functions such as eval and base64_decode. Sort files by modification date and review the newest first. And once your suspicion is confirmed, don't settle for deleting the file: backdoors usually come in groups, and the full fix is explained in the guide to detecting and removing malware.

Can I move the wp-content folder somewhere else?

Technically, yes. WordPress supports constants in wp-config.php that let you change the wp-content path and URL, and some advanced security setups take advantage of this. But the practical answer for most sites is: don't. Many plugins and themes assume the default path and hard-code it, and the result is broken image links, stylesheets that don't load and problems that are hard to trace. The security benefit of moving it is marginal compared with basic measures such as updating everything regularly, blocking PHP execution inside uploads and restricting access to the dashboard.

Sources

Frequently asked questions

Can I delete the wp-includes folder to save space?

Absolutely not. wp-includes contains the core libraries and functions WordPress calls on every request, and deleting it immediately takes the site down with a fatal error. It is only a few megabytes and adds almost no weight compared with the uploads folder, which usually accounts for more than 90% of a site's size. If you are looking for space, start by compressing images and deleting unused image sizes, clearing leftovers in wp-content/upgrade and cache, and deleting inactive themes and plugins. Those are real, safe sources of space.

What exactly is the correct permission for wp-config.php?

The recommended value is 640: the owner can read and write, the group can read, and others get nothing. On a private server you fully control, you can tighten it to 600, which shuts out even the group. The goal is the same: prevent any other account on the server from reading your database connection details. Some hosting setups don't accept this tightening and respond with a 500 error when the site is opened. If that happens, set the file back to 644 immediately and ask support what limit their setup allows instead of trying numbers at random.

Why can't I find the mu-plugins folder on my site?

Because WordPress doesn't create it by default. The folder is entirely optional and only appears if you, your host or a plugin that needs it creates it. Its absence is not a problem or a sign of an incomplete installation. If you want to use it, create it yourself inside wp-content with 755 permissions and put a PHP file at its top level; it will run automatically without activation. But remember the crucial rule: whatever you put there cannot be disabled from the dashboard at all, and the only way to stop it is to delete the file directly from the server.

Is 777 safe if I only use it temporarily and then change it back?

No. "Temporarily" is a stretchy word in practice: automated scans looking for writable folders run around the clock, and a window of a few minutes is enough. Worse, most people genuinely forget to change it back, so 777 stays for months. And even if you are disciplined, the fix itself is wrong: if uploads don't work with 755, the problem is file ownership (user/group), not the number, and raising the number hides the symptom without treating the cause. Correct the ownership with chown or ask support to do it, and 755 will work without any problem.

What is the difference between editing theme files and editing core files?

Both are lost on update, but the fix differs. Editing core files (wp-admin and wp-includes) is never justified: the right alternative is always a hook or filter inside a small plugin. Editing theme files, on the other hand, is a perfectly legitimate need, and the right solution is a child theme, which inherits everything from the parent theme and keeps your changes in a separate folder that updates don't touch. The general rule: design customizations go in the child theme, and functionality customizations go in a plugin of your own.

A debug.log file appeared in wp-content. Should I delete it?

Yes, delete it after you read what's in it. Its presence means debug mode is enabled in wp-config.php, which is useful while diagnosing a problem but shouldn't stay enabled on a live site. The reason is that the file sits inside a web-accessible folder and can be read from outside just by typing its path, and it reveals server paths, file names and sometimes query details. Turn debugging off in wp-config.php first, then delete the file. If you need to keep it temporarily, block access to it with a server-level rule.

How can I tell if a file on my site is suspicious or malicious?

Four indicators together are stronger than any one alone: a recent modification date on a file you haven't touched; a PHP file in a place it doesn't belong, such as wp-content/uploads or the year folders; a random name or one that imitates core names, such as wp-cache-x1.php in the root; and compressed or obfuscated content that starts with functions such as eval and base64_decode. Sort files by modification date and review the newest first. And once your suspicion is confirmed, don't settle for deleting the file: backdoors usually come in groups, and the full fix is explained in the guide to detecting and removing malware.

Can I move the wp-content folder somewhere else?

Technically, yes. WordPress supports constants in wp-config.php that let you change the wp-content path and URL, and some advanced security setups take advantage of this. But the practical answer for most sites is: don't. Many plugins and themes assume the default path and hard-code it, and the result is broken image links, stylesheets that don't load and problems that are hard to trace. The security benefit of moving it is marginal compared with basic measures such as updating everything regularly, blocking PHP execution inside uploads and restricting access to the dashboard.