Fall Sale! Code FALL2024 takes 25% OFF our Pro Plugins & Books »
Web Dev + WordPress + Security
eBook: .htaccess made easy
.htaccess made easy: Improve site performance and security.

How to Download Error Logs in Plesk

Quick tip that I want to keep for future reference: where/how to download the error logs for a site in Plesk. Normally in Plesk, to view a site’s error (and access) logs, you visit the Logs screen and select whichever logs, which then are displayed within the web page. So you can view all the log information within the Plesk UI. In general, the log viewer in Plesk works great and is configurable, etc.

Shortcut: Jump directly to how to download error logs in Plesk

Dealing with large log files

The only issue that I sometimes run into, is that only 500 lines of the log are displayed at a time. So if you want to “zoom out” for a wider view, it can take a lot of extra time, clicking the “Load previous entries” button over and over to keep loading the next 500 log entries.. it can be a pain. Likewise if you just need to view the oldest entries in the log file. For very large logs, it can take forever clicking “Load previous entries” until the cows come home.

Sometimes you just gotta download

As someone who is constantly digging through site logs, the Plesk “Logs” interface can really slow things down and get a little tedious if not downright frustrating. So, awhile back, I took a few moments to figure out how and where to download log files directly to my local machine, in the form of plain text files that can be opened in any decent text editor.

Pro Tip: Log files can get pretty huge, like tens of hundreds of megabytes in size. This is one reason why the Plesk 500-entries-at-a-time display is helpful. Because it enables you to examine even the largest of log files without crashing anything. If you are going the download route, best advice is to use a hearty text-editor/app that can handle very large files.

Download Log Files Directly

So the punchline: You can download any site’s access and error logs directly from the server, via the following paths:

/var/log/httpd/access_log
/var/log/httpd/error_log

You can connect to (S)FTP client Application (such as FileZilla) as root login and download either/both of these files to your local machine.

Note: The server paths for log files may vary depending on your server configuration. For example, the paths given above are for Linux servers. Other servers will have their own log locations. Ask your web host will know exactly where to find them.

Other Error Logs

In addition to the main error log, error_log, it is common for servers to host multiple logs, archived by date. Here are some examples to give you an idea:

/var/log/httpd/error_log
/var/log/httpd/error_log-20240901
/var/log/httpd/error_log-20240811
/var/log/httpd/error_log-20240818
/var/log/httpd/error_log-20240825
.
.
.

Also: ssl_error_log et al

Similar archived files probably exist for access logs as well.

Even more locations..

Yes there are more places to find log files. Here are some examples:

/var/log/sw-cp-server/error_log
/var/log/sw-cp-server/sw-engine.log

/var/log/sw-cp-server/error_log-20240811.gz
/var/log/sw-cp-server/error_log-20240818.gz
/var/log/sw-cp-server/error_log-20240825.gz

/var/log/sw-cp-server/sw-engine.log-20240707.gz
/var/log/sw-cp-server/sw-engine.log-20240727.gz

/var/log/sw-cp-server/access.log-20201227.gz
/var/log/sw-cp-server/access.log-20210115.gz

And even more: each site on the server has its own set of log files, for example:

/var/www/vhosts/example.com/logs/error_log.1.gz
/var/www/vhosts/example.com/logs/error_log.2.gz
/var/www/vhosts/example.com/logs/error_log.3.gz
/var/www/vhosts/example.com/logs/error_log.4.gz
/var/www/vhosts/example.com/logs/error_log.5.gz
/var/www/vhosts/example.com/logs/error_log.6.gz
/var/www/vhosts/example.com/logs/error_log.7.gz
.
.
.

The numbers correspond to the site’s “Log Rotation” settings.

About the Author
Jeff Starr = Web Developer. Security Specialist. WordPress Buff.
The Tao of WordPress: Master the art of WordPress.

3 responses to “How to Download Error Logs in Plesk”

  1. A recommendation for an editor that can process large files without crashing? I use Sublime Text, but would actually like to use something more minimal. Any sometimes it crashes.

  2. In addition to connecting via SFTP, you can download these files using Linux scp command, like this:

    scp username@example.com:/var/log/httpd/error_log /local/downloads

    Note this is connecting *to* the server *from* the local machine (not vice versa).

Comments are closed for this post. Something to add? Let me know.
Welcome
Perishable Press is operated by Jeff Starr, a professional web developer and book author with two decades of experience. Here you will find posts about web development, WordPress, security, and more »
The Tao of WordPress: Master the art of WordPress.
Thoughts
I disabled AI in Google search results. It was making me lazy.
Went out walking today and soaked up some sunshine. It felt good.
I have an original box/packaging for 2010 iMac if anyone wants it free let me know.
Always ask AI to cite its sources. Also: “The Web” is not a valid answer.
All free plugins updated and ready for WP 6.6 dropping next week. Pro plugin updates in the works also complete :)
99% of video thumbnail/previews are pure cringe. Goofy faces = Clickbait.
RIP ICQ
Newsletter
Get news, updates, deals & tips via email.
Email kept private. Easy unsubscribe anytime.