Server
Configuring server-side technical options, security, and SEO in OpenCart 4
Introduction
The Server tab contains technical settings that affect the security, performance, and SEO of your OpenCart installation. These options interact directly with your web server and should be configured with care.
Accessing Server Settings
Configuration Fields
Below are the key fields found in the Server tab:
Maintenance & SEO
Maintenance Mode: Set to Yes to prevent customers from browsing your store while you are making updates. They will see a "Maintenance" message instead. Logged-in administrators can still see the storefront.
Use SEO URLs: Set to Yes to enable friendly URLs (e.g.,
/iphoneinstead of/index.php?route=product/product&product_id=42).
Performance
Compression Level: GZIP compression level (0-9). Higher levels reduce the amount of data sent to the browser but use more CPU resources. A setting of
4or5is usually balanced.
Error Handling
Display Errors: Set to No on live production sites to prevent technical details from being visible to customers.
Log Errors: Set to Yes to record system errors in a file for troubleshooting.
Error Log Filename: The name of the file where errors are saved (default is
error.log).
Security Risk: Never set Display Errors to "Yes" on a live store. This can expose sensitive server information to malicious users.
Common Tasks
Enabling Maintenance Mode
When you need to perform updates or changes without customers seeing errors:
Navigate to the Maintenance & SEO section.
Set Maintenance Mode to Yes.
Click Save. Your store will now display a maintenance message to everyone except logged-in administrators.
Activating SEO Friendly URLs
To make your URLs look professional and improve search rankings:
Set Use SEO URLs to Yes.
Crucial Step: You must rename the file
htaccess.txtin your OpenCart root directory to.htaccess.Ensure each product, category, and information page has a unique SEO URL (Keyword) assigned in its respective "SEO" tab.
Best Practices
Troubleshooting
"The Server settings are the protective walls and high-performance engine of your store. Balancing security with speed ensures a safe and fast experience for your users."
Last updated