<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>OpenCart Archives - ServerStadium</title>
	<atom:link href="https://serverstadium.com/knowledge-base/tag/opencart/feed/" rel="self" type="application/rss+xml" />
	<link>https://serverstadium.com/knowledge-base/tag/opencart/</link>
	<description>Public Cloud Solution by ServerStadium</description>
	<lastBuildDate>Tue, 12 Aug 2025 17:56:09 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=7.1.4</generator>

<image>
	<url>https://serverstadium.com/wp-content/uploads/2023/04/cropped-favicon-1-32x32.png</url>
	<title>OpenCart Archives - ServerStadium</title>
	<link>https://serverstadium.com/knowledge-base/tag/opencart/</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>Install OpenCart on a ServerStadium Dedicated Server</title>
		<link>https://serverstadium.com/knowledge-base/opencart-on-dedicated-server-quickstart/</link>
		
		<dc:creator><![CDATA[Brian K]]></dc:creator>
		<pubDate>Tue, 12 Aug 2025 17:56:06 +0000</pubDate>
				<guid isPermaLink="false">https://serverstadium.com/?post_type=epkb_post_type_1&#038;p=12190</guid>

					<description><![CDATA[<p>Introduction Launch a fast OpenCart store on a ServerStadium dedicated server (or ServerStadium VM) running Ubuntu 24.04. This quickstart walks beginners through installing OpenCart 4, enabling SEO-friendly URLs, adding free HTTPS via Let’s Encrypt, and getting sample data/themes in place—so you can start selling today on reliable ServerStadium hardware. Prerequisites A ServerStadium dedicated server or&#8230;</p>
<p>The post <a href="https://serverstadium.com/knowledge-base/opencart-on-dedicated-server-quickstart/">Install OpenCart on a ServerStadium Dedicated Server</a> appeared first on <a href="https://serverstadium.com">ServerStadium</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<h2 class="wp-block-heading">Introduction</h2>



<p class="wp-block-paragraph">Launch a fast OpenCart store on a <a href="https://serverstadium.com/dedicated-server/?utm_source=kb&#038;utm_medium=article&#038;utm_campaign=dedicated_server">ServerStadium dedicated server</a> (or <a href="https://serverstadium.com/?utm_source=kb&#038;utm_medium=article&#038;utm_campaign=dedicated_server">ServerStadium VM</a>) running Ubuntu 24.04. This quickstart walks beginners through installing OpenCart 4, enabling SEO-friendly URLs, adding free HTTPS via Let’s Encrypt, and getting sample data/themes in place—so you can start selling today on reliable ServerStadium hardware.</p>



<h2 class="wp-block-heading">Prerequisites</h2>



<ul class="wp-block-list">
  <li>A <a href="https://serverstadium.com/dedicated-server/?utm_source=kb&amp;utm_medium=article&amp;utm_campaign=dedicated_server">ServerStadium dedicated server</a> or <a href="https://serverstadium.com/?utm_source=kb&amp;utm_medium=article&amp;utm_campaign=dedicated_server">VM</a> with Ubuntu 24.04 and a domain pointed to your server’s IP.</li>
  <li>SSH access with a sudo-capable user.</li>
  <li>An email address for Let’s Encrypt and an SMTP provider (for order emails).</li>
</ul>



<h2 class="wp-block-heading">Step 1 — Install LAMP and PHP Extensions</h2>



<p class="wp-block-paragraph">OpenCart 4 requires PHP 8.1+ with common extensions. Install Apache, MariaDB/MySQL, and PHP on Ubuntu 24.04:</p>


<pre><code>sudo apt update && sudo apt -y upgrade
sudo apt -y install apache2 mysql-server \
  php libapache2-mod-php php-mysql php-curl php-zip php-xml php-gd php-mbstring php-intl \
  unzip curl
sudo a2enmod rewrite
sudo systemctl enable --now apache2 mysql
</code></pre>


<h2 class="wp-block-heading">Step 2 — Create Database and User</h2>


<pre><code>sudo mysql_secure_installation

sudo mysql -e "CREATE DATABASE ocdb DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_520_ci;"
sudo mysql -e "CREATE USER 'ocuser'@'localhost' IDENTIFIED BY 'ChangeThisStrongPassword!';"
sudo mysql -e "GRANT ALL PRIVILEGES ON ocdb.* TO 'ocuser'@'localhost'; FLUSH PRIVILEGES;"
</code></pre>


<h2 class="wp-block-heading">Step 3 — Download OpenCart 4.1.0.3</h2>



<p class="wp-block-paragraph">Grab the latest OpenCart 4 release and unpack it.</p>


<pre><code>cd /tmp
wget -O opencart.zip "https://sourceforge.net/projects/opencart.mirror/files/4.1.0.3/opencart-4.1.0.3.zip/download"
unzip opencart.zip
</code></pre>


<h2 class="wp-block-heading">Step 4 — Deploy Files and Set Permissions</h2>


<pre><code>sudo mkdir -p /var/www/opencart
# OpenCart zip contains an "upload" directory. Copy its contents to your web root.
sudo rsync -a upload/ /var/www/opencart/

# Rename config templates as required by the installer
sudo cp /var/www/opencart/config-dist.php /var/www/opencart/config.php
sudo cp /var/www/opencart/admin/config-dist.php /var/www/opencart/admin/config.php

# Prepare .htaccess for SEO URLs
sudo mv /var/www/opencart/htaccess.txt /var/www/opencart/.htaccess

# Ownership/permissions
sudo chown -R www-data:www-data /var/www/opencart
sudo find /var/www/opencart -type d -exec chmod 755 {} \;
sudo find /var/www/opencart -type f -exec chmod 644 {} \;

# Allow installer to write config files during setup (we'll lock down later)
sudo chmod 664 /var/www/opencart/config.php /var/www/opencart/admin/config.php
</code></pre>


<h2 class="wp-block-heading">Step 5 — Configure Apache Virtual Host</h2>



<p class="wp-block-paragraph">Replace <code>example.com</code> with your domain.</p>


<pre><code>sudo tee /etc/apache2/sites-available/opencart.conf >/dev/null <<'EOF'
&lt;VirtualHost *:80&gt;
  ServerName example.com
  ServerAlias www.example.com
  DocumentRoot /var/www/opencart

  &lt;Directory /var/www/opencart&gt;
    AllowOverride All
    Require all granted
  &lt;/Directory&gt;

  ErrorLog ${APACHE_LOG_DIR}/oc_error.log
  CustomLog ${APACHE_LOG_DIR}/oc_access.log combined
&lt;/VirtualHost&gt;
EOF

sudo a2ensite opencart.conf
sudo apache2ctl configtest &#038;&#038; sudo systemctl reload apache2
</code></pre>


<h2 class="wp-block-heading">Step 6 — Enable HTTPS with Let’s Encrypt</h2>


<pre><code>sudo apt -y install certbot python3-certbot-apache
sudo certbot --apache -d example.com -d www.example.com --redirect -m you@example.com --agree-tos -n
</code></pre>


<h2 class="wp-block-heading">Step 7 — Run the Web Installer</h2>



<ul class="wp-block-list">
  <li>Open <code>https://example.com</code> and follow the installer.</li>
  <li>Database: <code>ocdb</code>, User: <code>ocuser</code>, Password: <code>ChangeThisStrongPassword!</code>, Host: <code>localhost</code>.</li>
  <li>Admin path: keep the suggested unique URL for security.</li>
</ul>



<p class="wp-block-paragraph"><em>After installation</em>, tighten configs and (optionally) move storage outside the web root:</p>


<pre><code># Lock down configs
sudo chmod 644 /var/www/opencart/config.php /var/www/opencart/admin/config.php

# (Optional) Move storage folder outside the web root for security
sudo mkdir -p /var/www/oc-storage
sudo rsync -a /var/www/opencart/system/storage/ /var/www/oc-storage/
# Update both config files so DIR_STORAGE points to /var/www/oc-storage/
sudo sed -i "s#'DIR_STORAGE'.*#'DIR_STORAGE', '/var/www/oc-storage/' );#g" /var/www/opencart/config.php
sudo sed -i "s#'DIR_STORAGE'.*#'DIR_STORAGE', '/var/www/oc-storage/' );#g" /var/www/opencart/admin/config.php
</code></pre>


<h2 class="wp-block-heading">Step 8 — Turn On SEO-Friendly URLs</h2>



<ul class="wp-block-list">
  <li>In Admin: <strong>System → Settings → Your Store → Server</strong> → enable <strong>Use SEO URLs</strong>.</li>
  <li>You already renamed <code>htaccess.txt</code> to <code>.htaccess</code> and enabled <code>mod_rewrite</code> in earlier steps.</li>
</ul>



<h2 class="wp-block-heading">Step 9 — Sample Data &amp; Theme Basics</h2>



<ul class="wp-block-list">
  <li><strong>Sample data:</strong> OpenCart ships with demo products/categories on fresh installs. Replace them under <em>Catalog → Products/Categories</em> as you build your store.</li>
  <li><strong>Themes:</strong> Go to <em>Extensions → Extensions</em>, choose “Themes”, edit <em>Your Store</em>, select a theme (or install one via <em>Extensions → Installer</em>), then enable and save.</li>
</ul>



<h2 class="wp-block-heading">Step 10 — Email &amp; Payments</h2>



<ul class="wp-block-list">
  <li><strong>Order email:</strong> In <em>System → Settings → Your Store → Mail</em>, choose SMTP and enter your provider’s host, port, encryption, username, and password; send a test email.</li>
  <li><strong>Gateways:</strong> In <em>Extensions → Extensions</em> (choose “Payments”), install Stripe/PayPal and connect your merchant account.</li>
</ul>



<h2 class="wp-block-heading">Optional: Quick Backup Script</h2>


<pre><code>sudo mkdir -p /opt/oc-backups
sudo tee /opt/oc-backups/backup.sh >/dev/null <<'EOF'
#!/usr/bin/env bash
set -e
TS=$(date +%F-%H%M)
SITE_ROOT="/var/www/opencart"
DB_NAME="ocdb"
DB_USER="ocuser"
DB_PASS="ChangeThisStrongPassword!"

mkdir -p /opt/oc-backups/${TS}
mysqldump -u ${DB_USER} -p${DB_PASS} ${DB_NAME} | gzip > /opt/oc-backups/${TS}/db.sql.gz
tar -czf /opt/oc-backups/${TS}/site-files.tgz -C "${SITE_ROOT}" .
find /opt/oc-backups -maxdepth 1 -type d -mtime +14 -exec rm -rf {} \; 2>/dev/null || true
EOF

sudo chmod +x /opt/oc-backups/backup.sh
echo "30 2 * * * root /opt/oc-backups/backup.sh" | sudo tee /etc/cron.d/oc-backup >/dev/null
</code></pre>


<h2 class="wp-block-heading">Troubleshooting</h2>



<ul class="wp-block-list">
  <li><strong>Installer fails requirements:</strong> Confirm PHP extensions (curl, zip, zlib, gd, mbstring, intl) are installed.</li>
  <li><strong>SEO URLs not working:</strong> Ensure <code>mod_rewrite</code> is enabled, your vHost allows <code>AllowOverride All</code>, and <code>.htaccess</code> exists in the web root.</li>
  <li><strong>Permission errors:</strong> Temporarily set <code>config.php</code> files to <code>664</code> for installation, then restore to <code>644</code>.</li>
  <li><strong>SSL issues:</strong> Verify DNS points to your server before running Certbot; re-run with <code>--apache</code> if needed.</li>
</ul>



<p class="wp-block-paragraph">Want a faster start? Choose an instant, low-cost <a href="https://serverstadium.com/dedicated-server/?utm_source=kb&amp;utm_medium=article&amp;utm_campaign=dedicated_server">ServerStadium dedicated server</a> and be online today.</p>



<h2 class="wp-block-heading">Conclusion</h2>



<p class="wp-block-paragraph">Your OpenCart store is now live with HTTPS, SEO URLs, and a theme foundation—ready for products, payments, and growth on ServerStadium. For more help or information about ServerStadium services, visit our <a href="https://serverstadium.com/knowledge-base/?utm_source=kb&amp;utm_medium=article&amp;utm_campaign=dedicated_server">knowledge base</a> or the <a href="https://serverstadium.com/?utm_source=kb&amp;utm_medium=article&amp;utm_campaign=dedicated_server">ServerStadium website</a>.</p>

<p>The post <a href="https://serverstadium.com/knowledge-base/opencart-on-dedicated-server-quickstart/">Install OpenCart on a ServerStadium Dedicated Server</a> appeared first on <a href="https://serverstadium.com">ServerStadium</a>.</p>
]]></content:encoded>
					
		
		
			</item>
	</channel>
</rss>
