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
.logor.zip. Focus your cleanup on large files (anything over 100MB) specifically located within thewp-contentor/var/logfolders. 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:
-
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.
-
PHP Session Failures: PHP uses specific directories (typically
/tmpor paths defined within yourphp.inifile) 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. -
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.
Using Command Line (Recommended)
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/cacheorwp-content/uploads- Any folder containing
.zip,.tar.gz, or.sqlfiles.
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.
- Log in via FileZilla, WinSCP, or your hosting’s web-based File Manager.
- Navigate directly to the directory identified by the
findcommand. - Locate and delete the specific large files (common culprits include
error_log,debug.log, or old.zipbackups). - Refresh your browser to see if the site loads.
How do I manage my resources more effectively?
| Management Area | Action Required | Business Value |
|---|---|---|
| Log Rotation | Configure logrotate for system logs and limit PHP’s error_log size via .htaccess. | Prevents unexpected crashes from “runaway” scripts. |
| Backup Strategy | Move all backups to an off-site provider (S3, Google Drive, or Dropbox). | Ensures data safety without consuming server space. |
| File Cleanup | Set a cron job to delete files in /tmp older than 24 hours. | Maintains system stability and “headroom” for operations. |
| Image Optimization | Implement 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.
-
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.
-
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_htmlorwww. -
Locate and delete any large files (especially logs) as described in the “How can I clear my logs” section. Identify and remove oversized
.logfiles or temporary cache files to immediately reclaim disk space. -
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.
- 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
/tmpdirectory and purge any log files older than 7 days. This keeps temporary data from accumulating and clogging your storage capacity. - 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.
- 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-contentfolder: 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 likewp-contententirely. 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.logor.zipfiles. - 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:
- 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.
- 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.
- 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.
Related Guides
- How to Fix “Error Establishing a Database Connection”
- Optimizing WordPress Image Performance
- Setting up Off-site Backups for Magento