← All guides

Website Down No Space Left on Device Error Fix

Your site is offline because the server reached 100% capacity, preventing database writes and PHP session file creation. To resolve this “no space left on device” error, access your server via SSH or a hosting control panel to identify and purge bloated log files or old backup archives that are clogging up the system.

Emergency Stop-Gap: If you need to restore basic functionality immediately, hop into your hosting account’s File Manager or connect via FTP/SFTP. Navigate directly to the root directory and perform a search for any files ending in .log or .zip. Focus your cleanup on large files (anything over 100MB) specifically located within the wp-content or /var/log folders. Removing these will clear enough overhead to get your site back online while you work on a more permanent cleanup of your server’s storage.

Before You Start

Secure your data before proceeding. I understand how frustrating it is to deal with disk errors, but you must attempt to back up your data before we start. While this seems counterintuitive when the server is reporting zero space, any small amount of remaining overhead should be used to create a snapshot or export your database immediately. If the disk has hit a hard 100% limit, standard backup plugins will likely fail because they lack the “breathing room” to process files; in this specific scenario, your backup becomes a meticulous log—a clear record of exactly which directories you are cleaning so you can track your changes. Do not delete any file until you have confirmed its function within your site’s architecture. Furthermore, avoid the /etc and /bin directories entirely; these contain core system configurations that must remain untouched unless specifically directed by a systems administrator.

Related guide: Fix .htaccess Redirect Loop: Guide to ERR_TOO_MANY_REDIRECTS

How does a full disk break my website?

When your server hits 100% disk capacity, it loses the ability to perform basic Input/Output (I/O) operations. Think of this as a hard stop for the system; if the server cannot write even a single byte of data, the software running your site begins to fail in a domino effect:

  1. Database Failures: Your database engine—whether you are running MySQL or MariaDB—is not a static file; it is an active process that requires constant room to create temporary tables and record transaction logs. When the disk is full, these operations are blocked immediately. The database will often lock up or crash entirely because it has nowhere to “write” its progress, which results in the common “Error establishing a database connection” message.

  2. PHP Session Failures: PHP uses specific directories (typically /tmp or paths defined within your php.ini file) to store session data. This data is what allows a site to remember who a user is as they move from page to page. If these directories are full, users will be unable to log in, and many of your plugins will stop functioning because the server cannot store the temporary information required to complete their tasks.

  3. Cache Invalidation: Caching layers like Redis or Memcached act as high-speed buffers for your site’s content. When there is no disk space available, these systems can no longer write updated fragments of data. This often leads to “White Screen” errors or broken page layouts because the front end cannot retrieve the necessary cached pieces to build a complete page.

Related guide: How to Resolve 502 Bad Gateway Error Website Down

What are the most common causes of this error?

I have spent years digging through server logs and reviving crashed production sites; in my experience, this specific issue usually stems from one of three primary culprits:

Bloated Error Logs

Many CMS platforms (such as WordPress or Magento) and development frameworks like Laravel generate .log files to record PHP errors. When a plugin contains a bug or a script fails to execute correctly, it can enter an infinite loop where it writes thousands of lines of data per minute into files like error_log or debug.log. These logs don’t just grow incrementally; they can balloon into several gigabytes in a matter of hours, choking your available disk space.

Stale Backups

It is common for automated backup plugins to create zipped archives of your site on a daily basis. If these plugins are configured to “store locally” rather than on an off-site server or cloud storage, the system will retain every historical version until the disk capacity is reached. For example, a single 10GB site with a 30-day retention policy can create a 300GB footprint in no time at all if those archives aren’t being purged.

User Uploads and Cache

Large image uploads that haven’t been compressed or optimized before being uploaded can consume significant space. Furthermore, an aggressive caching plugin that generates and stores thousands of individual assets for every visitor can quickly eat through the limited megabytes provided on a smaller VPS or shared hosting plan.

Related guide: How to Resolve Cloudflare Error 521: Web Server is Down

How do I check my current disk usage?

Running out of disk space is one of the most common reasons a site suddenly goes offline or starts throwing 500 errors. It’s an incredibly frustrating position to be in, but identifying the source of the bloat is a straightforward process once we know which commands to run. If you have SSH access provided by your host, we can get a precise look at your server’s health immediately.

If you can log in via SSH, we want to see exactly how much space remains and which specific partition is reaching its limit. Run the following command to get an overview of your filesystem:

df -h

The -h flag is essential here because it translates the raw block numbers into “human-readable” formats like Gigabytes (G) and Megabytes (M). Scan the list for any partition showing 100% or 99% usage. These are the areas we need to address immediately to get your site stable.

Once you identify a full partition, you need to find out exactly what is filling it up. Run this command to see the size of every directory in your current path:

du -sh * | sort -h

This command calculates the size of each folder and sorts them numerically so that the largest items appear at the bottom of your screen. If you see a large folder (like logs, backups, or cache), move into that directory using cd and run the same command again. You will “drill down” through the folders until you find the specific culprit taking up the space.

Using a Control Panel (cPanel/Plesk)

If your hosting environment doesn’t provide SSH access or if you prefer a visual interface, you can check your limits through your primary control panel. Log in and look for icons labeled “Disk Usage,” “File Manager,” or “Resource Usage.” Most modern panels, including cPanel and Plesk, will display a progress bar showing how much of your allocated storage is currently occupied. This will tell you if you are hitting your account’s hard limit or if the server itself is running low on space.

Where are the large files hiding?

When your site crashes due to a “disk full” error, you need to identify exactly which files are hogging the space so we can clear them out. Rather than clicking through every folder manually, use the find command. This is the most direct way to surface those massive log files that typically cause these types of system failures.

Run this command to list every file larger than 100MB:

find / -type f -size +100M -exec ls -lh {} \;

If you are on a shared hosting plan and don’t have root access, the system may restrict your search results. In that specific case, run this command to scan only your account’s home directory:

find . -type f -size +100M

Watch out for “hidden” bloat in these common locations:

  • /var/log (System logs)
  • /tmp (Temporary files)
  • wp-content/cache or wp-content/uploads
  • Any folder containing .zip, .tar.gz, or .sql files.

How can I clear my logs and restore site functionality quickly?

I know how stressful it is when your site goes dark, but in many cases involving “disk full” errors, the fix is straightforward. When a log file swells to an enormous size, it consumes all available space, preventing your database from writing new data. Removing these files clears the path so your database can resume its operations.

Deleting via SSH

If you find a massive error_log file sitting in your web directory, you can clear it immediately using the command line. This is often the fastest way to get things moving if you have terminal access.

rm /home/username/public_html/wp-content/debug.log

Once you have deleted the file, run the df -h command to verify that your disk space has increased. Your site should transition back to a “functional” state—meaning the database can successfully connect again—even if there are still underlying code errors that need your attention later.

Deleting via File Manager / FTP

If you aren’t comfortable with the command line, you can use a standard file transfer tool or your hosting provider’s web dashboard to clear the space.

  1. Log in via FileZilla, WinSCP, or your hosting’s web-based File Manager.
  2. Navigate directly to the directory identified by the find command.
  3. Locate and delete the specific large files (common culprits include error_log, debug.log, or old .zip backups).
  4. Refresh your browser to see if the site loads.

How do I manage my resources more effectively?

Management AreaAction RequiredBusiness Value
Log RotationConfigure logrotate for system logs and limit PHP’s error_log size via .htaccess.Prevents unexpected crashes from “runaway” scripts.
Backup StrategyMove all backups to an off-site provider (S3, Google Drive, or Dropbox).Ensures data safety without consuming server space.
File CleanupSet a cron job to delete files in /tmp older than 24 hours.Maintains system stability and “headroom” for operations.
Image OptimizationImplement automated compression on all user uploads.Reduces the storage footprint of your media library.

Why did my backup plugin take up so much space?

I see this issue pop up frequently when you are trying to secure your site’s data. Many users choose plugins like UpdraftPlus or Duplicator because they are convenient, but if you do not link these to a remote storage provider (like Amazon S3), they will store every “snapshot” on your local disk.

The Fix: Connect your backup plugin to an external API. This ensures that even if the local site is deleted or crashes, your data remains safe elsewhere, while your server’s disk stays clean for serving visitors.

What do I do if I cannot access my admin dashboard?

Getting locked out of WordPress, Magento, or any other CMS because a “No space” error has crashed the login script is a common but stressful hurdle. Because the system physically lacks the room to write new data, you cannot use an internal plugin to fix the problem at this stage. You must bypass the website’s interface and act directly at the server level.

  1. Access your hosting control panel. Log in to your account with your hosting provider (such as SiteGround, Bluehost, or a dedicated VPS dashboard) to gain access to your underlying files.

  2. Use the File Manager to navigate through the directories to your installation’s root folder. Open the File Manager tool and move into the primary directory where your site lives—typically labeled public_html or www.

  3. Locate and delete any large files (especially logs) as described in the “How can I clear my logs” section. Identify and remove oversized .log files or temporary cache files to immediately reclaim disk space.

  4. Refresh the page. Once you have freed up enough space, refresh your login page. With available storage now accessible, the PHP engine will be able to create a session for you to log in successfully.

How do I prevent this from happening again?

To stop these crashes before they happen, we need to move your site from a reactive “firefighting” mode into a proactive maintenance cycle. By setting up some basic safeguards now, you can ensure the server stays healthy without needing constant manual intervention.

  1. Establish Automated Cron Jobs: If your site experiences high traffic, manual cleanup isn’t enough. You should set up a daily cron job to automatically clear the /tmp directory and purge any log files older than 7 days. This keeps temporary data from accumulating and clogging your storage capacity.
  2. Implement Active Disk Monitoring: You shouldn’t have to wait for a “Disk Full” error to realize there is a problem. Use a monitoring tool—such as UptimeRobot or New Relic—to send you an immediate alert the moment your disk usage exceeds 80%. This provides a necessary buffer so you can address the issue before it takes your site offline.
  3. Conduct Monthly Plugin Audits: Not all plugins are created equal; some can be poorly optimized and generate massive amounts of data or runaway log files. Every month, audit your active plugins to identify if any specific one is consuming an excessive amount of storage space.

Common mistakes that make the problem worse

  • Restarting the server repeatedly: If your disk is already full, a reboot won’t magically clear any space. Instead, it usually creates a frustrating loop: the server tries to boot up, attempts to write a standard log entry upon startup, finds no available room, and crashes immediately. You aren’t fixing the capacity issue by restarting; you’re just forcing the system to fail at the same point every time it tries to start.
  • Deleting the entire wp-content folder: I see this happen when site owners get overwhelmed and try to “clear everything” to find some breathing room. You must avoid deleting large directories like wp-content entirely. This folder houses your actual assets—your images, your themes, and your active plugins. Deleting it will likely break the site’s layout or remove your content entirely. Only delete specific files that are clearly identified as bloat, such as .log or .zip files.
  • Ignoring the root cause: Scrubbing a 50GB log file is a great way to get your site back online for the next hour, but it’s not a permanent fix. If a log file reached that size, it means there is an underlying script error or a malfunctioning plugin constantly “dumping” data into that file. Unless you identify and stop the specific process causing the leak, that file will simply start growing again as soon as your visitors start hitting the site.

When to call a professional?

There are moments when technical roadblocks become too complex for a standard fix, and bringing in an expert is the fastest way to get back online. You should reach out to a server administrator or a specialized recovery specialist if you encounter any of the following:

  1. The disk usage remains at 100% even after you have deleted the large log files you identified. This typically indicates an “Inodes” issue, meaning the system is overwhelmed by a massive quantity of small files rather than a lack of raw storage space.
  2. You are unable to access your SSH terminal, File Manager, or hosting control panel. If you are locked out of the backend tools entirely, a specialist is required to regain entry and stabilize the environment.
  3. The site remains offline after space has been cleared. This suggests that the database tables were corrupted during the initial crash and require manual reconstruction to function again.

A professional won’t just provide a quick fix; they will perform a deep audit of your server’s configuration, establish automated rotation for logs to prevent future bloat, and ensure your backup pipeline is correctly routing data to off-site storage.

  • How to Fix “Error Establishing a Database Connection”
  • Optimizing WordPress Image Performance
  • Setting up Off-site Backups for Magento

Frequently Asked Questions

Why does my disk say it's full even after I deleted files?

If you have purged large files but your dashboard continues to report a full disk, you are likely hitting an Inode limit rather than a simple storage capacity issue. Think of it as the difference between having a full warehouse and having too many individual boxes for the system to track; while "space" refers to the size of the data, Inodes refer to the number of individual files the filesystem can index. Even if you have gigabytes of raw space available, a Linux server has a hard cap on the total number of items it can manage simultaneously. If your `/tmp` directory is clogged with millions of tiny session files, you will run out of Inodes and trigger errors. To verify this specifically, run the command `df -i`.

Is "No space left on device" the same as an "Error establishing a database connection"?

These are distinct issues, but they are frequently linked in a chain reaction that causes site crashes. An "Error establishing a database connection" means your PHP script is unable to communicate with the MySQL server. This typically happens because the MySQL service crashed or hung the moment it attempted to write data and found no available disk space. In these cases, clearing the disk space is the primary step required to allow the MySQL service to stabilize and resume its operations.

How do I check if my Inodes are full?

To confirm whether your Inode count is the culprit, log into your terminal and execute `df -i`. If any partition shows 100% usage, you must clear a large volume of small files—usually old session data or cache fragments—rather than focusing on deleting just one large log file. You can determine the total number of files currently residing in your directory by running the command `find . -type f | wc -l`.

Need this fixed right now?

Whatever broke, we diagnose it fast and quote a fixed price before we start. See our Emergency Website Repair service — repairs start from $149.

Fix My Site Now