When a website stops behaving, restarting everything is tempting. It is also a good way to disturb the evidence and possibly create a second problem for the first one to talk to.
I prefer to start with a smaller question: is Apache running, and is there an obvious reason it might not be serving the site properly? The goal here is to check the service, inspect its journal and validate its configuration without intentionally editing configuration files or restarting Apache.
That is not quite the same as promising that nothing on the system will change. Commands may be recorded in audit or authentication logs, and even opening a page can create access-log entries or trigger application activity. I have included a browser check as an optional step, with those caveats in mind.
This is not a complete WordPress troubleshooting guide. An active Apache service can still serve a broken application, and valid Apache syntax does not prove that routing or permissions are correct. We are narrowing the problem, not declaring victory over the internet.
What you will need
- An Ubuntu server with Apache installed as the standard
apache2service. - Shell access to the server and permission to use
sudofor the journal and configuration checks. - Optionally, a browser and the address you normally use for the site. The address is site-specific; use your own rather than an example from someone else’s server.
These steps do not assume a particular virtual host, document root, WordPress configuration or network layout. The commands are intended to inspect the system, not alter its configuration or service state. If your environment requires a strictly controlled investigation, check its auditing and operational rules before running them.
1. Check the Apache service
Connect to the server using your usual method, then run:
systemctl status apache2.service --no-pager -l
This asks systemd for the service’s current status. The --no-pager option prints the output directly, while -l asks for full lines rather than truncated ones.
Look at the Active line first. An active service tells you systemd currently considers Apache to be running. An inactive or failed service gives you a different place to start. The output may also include recent journal entries, but it is only a snapshot, not a complete history.
Don’t mistake an active service for a healthy website. Apache can be running while an application errors, the wrong site is selected, or a request never reaches the server. Servers are quite capable of being technically present and emotionally unavailable.
2. Read the recent service journal
For more context, ask for the most recent 100 Apache service journal entries from the current boot:
sudo journalctl -u apache2.service -b -n 100 --no-pager
The -u option selects the service, -b limits the output to the current boot, and -n 100 limits how many entries are shown. Read the timestamps and messages around the time the problem occurred, if you know it.
Look for messages about startup failures, configuration problems or permission errors. A message is a clue, not automatically the cause of the current fault. Compare its timing with the symptom before rearranging the server around it.
The journal may not contain every Apache request or error. Depending on the site’s logging configuration, relevant detail may be written to separate log files. Their paths are site-specific, so I would check the existing Apache configuration or the server’s documentation rather than assume a location.
Keep the output private. Logs can contain hostnames, client addresses, request paths and other information you may not want to publish. Redact carefully before asking anyone else to review an excerpt.
3. Check the configuration syntax
Next, ask Apache to check its configuration:
sudo apache2ctl configtest
A successful check normally reports Syntax OK. If the check reports an error, read the message and note any file and line it identifies. This command does not reload Apache or apply a configuration change.
A syntax check has limits. It can tell you that Apache can parse the configuration it reads; it cannot prove that the configuration does what you intended, that WordPress is healthy, or that visitors can reach the site. A warning can also appear alongside a successful syntax result, so read the whole output rather than hunting for two reassuring words.
If you decide a configuration file needs editing, make that a separate, deliberate task. Know how you will back out the change, and run the syntax check again before considering a reload. I am leaving the reload out because the right next action depends on what you find.
4. Optionally check the site in a browser
Open the site’s usual address using its actual hostname. A browser on your normal network gives you a browser check, not necessarily a view from the wider internet. If you specifically need to check external access, use a client on a separate external network, provided you are authorised to do so.
A request can have side effects. It may create access-log entries, and the site or its application may perform additional work. Even loading a page is not guaranteed to be harmless. Skip this step if making a request is unsafe or outside the scope of your investigation.
If you do check, note what happens: does the expected page load, does the browser show a connection error, or does the server return an error page? Avoid submitting forms or triggering administrative actions merely for the sake of a test.
Compare the browser result with the service and configuration checks. For example, a running Apache service plus a browser connection error suggests looking beyond Apache’s process state. A page that loads but contains an application error points towards the application and its logs. Neither observation, on its own, identifies the precise cause.
How to tell whether the checks worked
You are looking for useful observations, not a guaranteed repair. The status command should return information about the Apache service. The journal command should show available entries or indicate that there are none for the selected scope. The configuration test should report its result. If you chose to use a browser, it gives you a separate view from that client’s network.
Write down which check disagrees with your expectation and any relevant timestamps. If everything looks normal but the reported problem is intermittent, that is still useful: you have a baseline to compare with the next occurrence. It is less satisfying than a dramatic fix, but my imaginary troubleshooting cape can stay in the cupboard.
Troubleshooting the checks
- Service not found: Confirm that Apache is installed and managed as
apache2.serviceon this server. A different installation or service name needs its own documentation; don’t substitute a guessed unit name. - Permission denied or incomplete journal access: Confirm that your account is authorised to use
sudo. If it isn’t, ask the server administrator rather than changing permissions as a workaround. - No useful journal entries: The current boot may not include the event, or relevant details may be in Apache’s separately configured logs. Check where this server writes them.
- Configuration test fails: Use the reported error and location as the starting point. Don’t assume the line mentioned is the only problem, and avoid editing a production configuration until you understand the change and recovery plan.
- Apache is active but the site still fails: Check the exact browser symptom, if a request is appropriate, then investigate the relevant application, site configuration or network path. Service status alone cannot distinguish them.
What remains unverified
These are general diagnostic steps, not a record of a test on your server. I cannot verify your service state, log locations, Apache configuration, site address or browser result from the information supplied. I also cannot tell you that a restart, configuration change or WordPress repair is needed.
The useful outcome is a smaller question. Instead of a vague report that the website is broken, you might have observations showing that Apache is active, the syntax check passes and a browser receives an application error. That is not a diagnosis, but it is considerably easier to investigate.