Learn how to use SSH to view LOG files in WordPress or Magento application server setups and what to do when the files are not where you would expect them.
Your Nexcess Guide to Log File Locations: Viewing a Server LOG File via SSH
What is Log File Monitoring?
Log File Monitoring is the overarching subject name for using the LOG files of the systems, servers, processes, applications and other components of the IT infrastructure to know the performance of the systems and mission critical applications such as Magento 2, WooCommerce, and WordPress in real time. The
LOG files of systems and applications contain richly detailed information such as operation status, execution results, code errors, and much more. Monitoring the LOG files helps System and Web Administrators determine the root cause of production issues and events, which can be used to fix problems and return systems to good health.
How Can You View a LOG File?
Easily and quickly would be the short answer! Simply put, you can open and read a LOG file with any text editor, including the default one included with your Operating System (OS).
Furthermore, in some instances, you might be able to open a LOG file in your web browser by dragging it directly into the browser window. The most straightforward method is always just to browse for the file and open it with your preferred text editor.
An Overview: Secure Shell Protocol (SSH) View LOG File Steps
As a WordPress or Magento website owner, you will likely encounter various errors while performing different website management tasks. To track down errors and their causes, you will need to check your logs, which is the record of events associated with your website.
This guide will show you how to use Secure Shell Protocol (SSH) to view LOG files in WordPress or Magento and what to do when these files are not where you would expect them to be.
General SSH Log File Location Information for WordPress Websites
Nexcess clients with WordPress websites will occasionally need to check logs when errors occur at the service or coding level. For a Nexcess Flexible Cloud Hosting Plan, you can use SSH to view use LOG files. You can also use FTP or access logs from your Nexcess Control Panel.
You will probably face permission issues when attempting to access certain locations or logs. But that is no cause for alarm — these limitations are set as a part of the security features included in your Nexcess Managed Hosting Plan.
Types of Logs You Might Encounter
While you may run into custom logs, too, the most common types of logs you are most likely to come across include:
The error.log — This is the most basic log that would record any service interruption, mod_security error, or any other possible errors based at the service level.
The transfer.log — This tracks account access details and functions similarly to the access log.
So, you know what you are looking for, but the real question is, how do you find it? There are multiple ways to access the major error logs for WordPress websites.
Let us guide you through each of the possible methods in the sections below.
Locating Logs Using the Nexcess Portal
For Nexcess Cloud Platform users, the simplest way to check the transfer log and error log is from the Nexcess Portal itself.
Once you are in the account portal, click Plans > Sites > Logs on the left-hand side. From there, you can download the following logs:
error.log
error-ssl.log
transfer.log
transfer-ssl.log
Download the desired logs based on the date and cross-check the needed details locally. In most cases, that will be all you need to do to figure out what is causing the error.
About Nexcess Client Portal
Log in to your Nexcess Client Portal and pick the product plan you have with Nexcess. Review to the Nexcess Client Portal Guide for more details on how best to use the portal.
Using FTP & SSH to View LOG Files
If you wish to use SSH to view LOG files with FTP, you must have the login credentials. For each Nexcess Cloud Account, only one user has SSH access. You can access and manage any of the sites that are hosted under that particular plan.
You will use the SSH user for FTP access as well. You can also create new FTP users under each account.
You can view the SSH/FTP login details in the Nexcess Portal under Access. In addition, you will find the account-based FTP access details under Sites > Access:
The password can be accessed a limited number of times, and you are able to reset it from the Nexcess Portal.
Typically, when you access the server over FTP or SSH, you will be entering the path /home/username/ or the path you have given the FTP user access to.
The below file structure is what you will typically see in /home/username/. However, the structure may vary as per the application:
From there, you need to navigate to the LOG file. The var log file in the log file location /home/username is not accessible due to permission/privilege issues:
The logs in var (var logs) are the same as what you can view in the log folder in /home/username:
As you enter the log folder, you may find symlinks of the LOG files for the respective accounts (as shown in the example above). You can continue by selecting your desired domain name. Then, you will be able to view the error logs and transfer logs for each site.
From the log, you can also find the PHP-based error log.
When you access the domain, you can view the logs, as shown in the example below:
These LOG files are the same logs you get from the Logs Section of the Nexcess Portal.
Finding the SSH Log File Location for Magento Users
Magento has its own custom logs, including:
exception log
magento log
debug log
These logs are not available in the Nexcess Portal. Instead, you need to use SSH to view these LOG files over FTP. The var log is listed under the html folder. The html folder of each domain will have the basic Magento infrastructure, and it should appear as follows:
Here, you can view a folder as var under /home/username/domainname/html location.
This folder contains the custom LOG file for Magento. After you access var, you can view the folder log.
Once accessed, you can check the log for the coding base as well as the exception base and application base for possible errors. You can check the exception log and debug log as well.
The log folder will have the following general structure for Magento:
Other Log Types
For the rest of the logs — like mail logs, authentication logs, the SSH log location, and any others — our support team will be there to assist you. Simply open a ticket with the Nexcess Support Team, and they can share the log details with you.
Consider Managed Hosting with Nexcess
Nexcess provides the needed level of automation to all routine website administration tasks that require technical knowledge and skills. Our Nexcess Client Portal is specifically designed to help website owners manage all technical aspects of their hosting plans leveraging a highly intuitive and user-friendly interface.
Our fully managed hosting plans are optimized for the chosen platform to provide you with the best approach to website hosting. Enhanced security, better performance, high flexibility, and great scaling options for a reasonable price are just some of the benefits a website owner gets by choosing one of the Nexcess Managed Hosting Plans.
Managed Applications with Nexcess
Hosting optimized for the industry's leading platforms including Managed WordPress Hosting, Managed WooCommerce Hosting, and Managed Magento Hosting:
Build Better Sites and Stores With Fully Managed Hosting from NexcessFaster Speeds, Stronger Security, Inherent Scalability and Trusted Support.
Our range of hosting plans caters to any business scale. We do all the heavy lifting for you to focus on growing your business. In addition, we automatically update ore components and plugins to the latest version and ensure your hosting environment is properly optimized, secured, and updated.
Nexcess infrastructure was specially designed to keep up the best speed and performance in the industry. No traffic surge can threaten your website to go down thanks to our autoscaling technology which adds more resources to your server to handle the load. In addition, we offer always-on security monitoring and support from web hosting experts 24/7/365 and a built-in CDN with 22 locations and advanced caching for ultra-fast loading.
All hosting plans include The Nexcess 30-Day Web Hosting Money Back Guarantee.
We also have a variety of Nexcess support articles about how best to implement our product offerings housed in the Nexcess Knowledge Base, including how to get your site going with a number of different configuration options. These resources include a great article on setting this up for Migrating to Nexcess with managed WordPress and managed WooCommerce hosting.
Need a No-Code Website Building Solution?
Are you on an accelerated schedule and already ready to move forward? If you need to get started with your Nexcess StoreBuilder Solution sooner rather than later, check out these resources:
24-Hour Assistance
If you need any assistance with the above-mentioned, don't hesitate to reach out. For 24-hour assistance any day of the year, Nexcess customers can contact our support team by email or through your Client Portal.
Why Choose Nexcess?
Because we are different! Chris Lema captures "the why" in his passionate and stirring recount of a Nexcess support-related story.
Useful YouTube > Nexcess Channel Links
- Nexcess on YouTube - Home
- Nexcess on YouTube - Welcome to Your Nexcess Portal
- Nexcess on YouTube - Featured Videos
- Nexcess on YouTube - All Videos
- Nexcess on YouTube - All Playlists
Resources for More Information
Need more help? The Website Management > .htaccess, and Scripts, Cron Jobs, Reports and Monitoring, IP Management, and Dev Sites sections within the Nexcess Knowledge Base are important resources for those seeking additional knowledge. The Applications section also contains valuable insights for those seeking additional knowledge about our other various hosted applications and platforms. Check out our related video playlists and articles below:
- Managed WordPress by Nexcess - Video Playlist
- Managed WooCommerce by Nexcess - Video Playlist
- Managed Magento by Nexcess - Video Playlist
New Customers: Fully Managed Hosting Solutions
Not a Nexcess customer yet? Check out our fully managed hosting solutions. The option to chat with an expert is also available.
Related Articles
- How to create Nexcess Cloud accounts
-
Domain Registration
- Global DNS Checker
- Buy an SSL Certificate
- What is a temporary or dynamic IP address?
- What are the benefits of dedicated IP addresses?