<?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>LAMP Archives - ServerStadium</title>
	<atom:link href="https://serverstadium.com/knowledge-base/tag/lamp/feed/" rel="self" type="application/rss+xml" />
	<link>https://serverstadium.com/knowledge-base/tag/lamp/</link>
	<description>Public Cloud Solution by ServerStadium</description>
	<lastBuildDate>Tue, 12 Aug 2025 17:39:12 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=7.1.5</generator>

<image>
	<url>https://serverstadium.com/wp-content/uploads/2023/04/cropped-favicon-1-32x32.png</url>
	<title>LAMP Archives - ServerStadium</title>
	<link>https://serverstadium.com/knowledge-base/tag/lamp/</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>One-Click WordPress on Ubuntu 24.04 for Small Business Sites</title>
		<link>https://serverstadium.com/knowledge-base/simple-wordpress-ubuntu-24-04-dedicated-servers/</link>
		
		<dc:creator><![CDATA[Brian K]]></dc:creator>
		<pubDate>Tue, 12 Aug 2025 17:32:21 +0000</pubDate>
				<guid isPermaLink="false">https://serverstadium.com/?post_type=epkb_post_type_1&#038;p=12181</guid>

					<description><![CDATA[<p>Introduction This guide will walk you through installing WordPress on a ServerStadium VM or a ServerStadium dedicated server running Ubuntu 24.04. We’ll cover both Apache (LAMP) and Nginx (LEMP), free SSL with Let’s Encrypt, and simple backup &#38; update routines—everything a small business needs to get online quickly with great performance. Prerequisites A ServerStadium VM&#8230;</p>
<p>The post <a href="https://serverstadium.com/knowledge-base/simple-wordpress-ubuntu-24-04-dedicated-servers/">One-Click WordPress on Ubuntu 24.04 for Small Business Sites</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">This guide will walk you through installing WordPress on a <a href="https://serverstadium.com/?utm_source=kb&#038;utm_medium=article&#038;utm_campaign=dedicated_server">ServerStadium VM</a> or a <a href="https://serverstadium.com/dedicated-server/?utm_source=kb&#038;utm_medium=article&#038;utm_campaign=dedicated_server">ServerStadium dedicated server</a> running Ubuntu 24.04. We’ll cover both Apache (LAMP) and Nginx (LEMP), free SSL with Let’s Encrypt, and simple backup &amp; update routines—everything a small business needs to get online quickly with great performance.</p>



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



<ul class="wp-block-list">
  <li>A <a href="https://serverstadium.com/?utm_source=kb&#038;utm_medium=article&#038;utm_campaign=dedicated_server">ServerStadium VM</a> or <a href="https://serverstadium.com/dedicated-server/?utm_source=kb&#038;utm_medium=article&#038;utm_campaign=dedicated_server">dedicated server</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 notifications (recommended).</li>
</ul>



<h2 class="wp-block-heading">Option A: LAMP (Apache) Quick Install</h2>



<p class="wp-block-paragraph">This path uses Apache + PHP + MySQL and enables HTTPS via the Certbot Apache plugin.</p>



<p class="wp-block-paragraph"><strong>1) Update and install packages</strong></p>


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


<p class="wp-block-paragraph"><strong>2) Secure MySQL &amp; create the WordPress database</strong></p>


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


<p class="wp-block-paragraph"><strong>3) Download &amp; place WordPress</strong></p>


<pre><code>cd /tmp
curl -LO https://wordpress.org/latest.tar.gz
tar -xzf latest.tar.gz
sudo rsync -a wordpress/ /var/www/html/
sudo chown -R www-data:www-data /var/www/html
sudo find /var/www/html -type d -exec chmod 755 {} \;
sudo find /var/www/html -type f -exec chmod 644 {} \;
</code></pre>


<p class="wp-block-paragraph"><strong>4) Configure Apache vHost</strong> (replace <code>example.com</code> with your domain)</p>


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

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

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

sudo a2ensite wordpress.conf
sudo systemctl reload apache2
</code></pre>


<p class="wp-block-paragraph"><strong>5) Create <code>wp-config.php</code> and add secure keys</strong></p>


<pre><code>cd /var/www/html
cp wp-config-sample.php wp-config.php
sed -i "s/database_name_here/wpdb/g; s/username_here/wpuser/g; s/password_here/ChangeThisStrongPassword!/g" wp-config.php
curl -s https://api.wordpress.org/secret-key/1.1/salt/ | sudo tee /tmp/wp.keys >/dev/null
sudo awk 'BEGIN{print "[MARK]"}1' wp-config.php | sed -e "/\[MARK\]/r /tmp/wp.keys" -e "/\[MARK\]/d" | sudo tee wp-config.php.new >/dev/null
sudo mv wp-config.php.new wp-config.php
sudo chown www-data:www-data wp-config.php
</code></pre>


<p class="wp-block-paragraph"><strong>6) Enable HTTPS (Let’s Encrypt)</strong></p>


<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">Option B: LEMP (Nginx) Quick Install</h2>



<p class="wp-block-paragraph">Prefer Nginx? Use PHP-FPM + Nginx + MySQL, then secure with Certbot’s Nginx plugin.</p>



<p class="wp-block-paragraph"><strong>1) Install Nginx, PHP-FPM, MySQL</strong></p>


<pre><code>sudo apt update
sudo apt -y install nginx mysql-server php-fpm php-mysql php-curl php-xml php-gd php-zip php-mbstring php-intl unzip
sudo systemctl enable --now nginx mysql
</code></pre>


<p class="wp-block-paragraph"><strong>2) Database (same as LAMP)</strong> — reuse the MySQL commands above to create <code>wpdb</code>/<code>wpuser</code>.</p>



<p class="wp-block-paragraph"><strong>3) Download &amp; set permissions</strong> (same as LAMP), but place WordPress at <code>/var/www/wordpress</code> for clarity:</p>


<pre><code>sudo mkdir -p /var/www/wordpress
sudo rsync -a /tmp/wordpress/ /var/www/wordpress/
sudo chown -R www-data:www-data /var/www/wordpress
</code></pre>


<p class="wp-block-paragraph"><strong>4) Nginx server block</strong> (replace <code>example.com</code>):</p>


<pre><code>sudo tee /etc/nginx/sites-available/wordpress >/dev/null <<'EOF'
server {
    listen 80;
    server_name example.com www.example.com;
    root /var/www/wordpress;

    index index.php index.html;
    location / {
        try_files $uri $uri/ /index.php?$args;
    }

    location ~ \.php$ {
        include snippets/fastcgi-php.conf;
        fastcgi_pass unix:/run/php/php-fpm.sock;
    }

    location ~* \.(png|jpg|jpeg|gif|ico|css|js)$ {
        expires max;
        log_not_found off;
    }
}
EOF

sudo ln -s /etc/nginx/sites-available/wordpress /etc/nginx/sites-enabled/wordpress
sudo nginx -t &#038;&#038; sudo systemctl reload nginx
</code></pre>


<p class="wp-block-paragraph"><strong>5) Create <code>wp-config.php</code> and salts</strong> (same as LAMP, but in <code>/var/www/wordpress</code>):</p>


<pre><code>cd /var/www/wordpress
cp wp-config-sample.php wp-config.php
sed -i "s/database_name_here/wpdb/g; s/username_here/wpuser/g; s/password_here/ChangeThisStrongPassword!/g" wp-config.php
curl -s https://api.wordpress.org/secret-key/1.1/salt/ | sudo tee -a wp-config.php >/dev/null
sudo chown www-data:www-data wp-config.php
</code></pre>


<p class="wp-block-paragraph"><strong>6) Enable HTTPS (Let’s Encrypt)</strong></p>


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


<h2 class="wp-block-heading">Finish Setup in the Browser</h2>



<p class="wp-block-paragraph">Visit <code>https://example.com</code> to complete the WordPress installer (site title, admin user). After logging in, go to <em>Settings → Permalinks</em> and click <em>Save</em> once to ensure pretty URLs work.</p>



<h2 class="wp-block-heading">Performance &amp; Security Basics</h2>



<ul class="wp-block-list">
  <li><strong>Permalinks &amp; rewrites:</strong> Apache needs <code>AllowOverride All</code> and Nginx uses the <code>try_files</code> rule shown above.</li>
  <li><strong>PHP modules:</strong> We installed commonly needed modules (curl, xml, gd, zip, mbstring, intl) for plugin/theme compatibility.</li>
  <li><strong>Auto-renew TLS:</strong> Certbot installs a timer by default. Verify with <code>systemctl status certbot.timer</code>.</li>
  <li><strong>Admin hygiene:</strong> Use strong passwords, enable two-factor for wp-admin, and keep plugins/themes minimal.</li>
</ul>



<h2 class="wp-block-heading">Simple Backups (Files + Database)</h2>



<p class="wp-block-paragraph">Create a quick backup script and schedule it with cron.</p>


<pre><code>sudo mkdir -p /opt/wp-backups
sudo tee /opt/wp-backups/backup.sh >/dev/null <<'EOF'
#!/usr/bin/env bash
set -e
TS=$(date +%F-%H%M)
SITE_ROOT="/var/www/html"   # or /var/www/wordpress for Nginx option
DB_NAME="wpdb"
DB_USER="wpuser"
DB_PASS="ChangeThisStrongPassword!"

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

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


<h2 class="wp-block-heading">Keeping WordPress Updated</h2>



<ul class="wp-block-list">
  <li><strong>Core/plugin/theme updates:</strong> In <em>Dashboard → Updates</em>, apply updates weekly.</li>
  <li><strong>CLI (optional):</strong> Install WP-CLI for scripted updates: <code>curl -O https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar && php wp-cli.phar --info</code>.</li>
  <li><strong>Backups first:</strong> Run your backup script before major updates or theme changes.</li>
</ul>



<h2 class="wp-block-heading">One-Click Installer (Optional)</h2>



<p class="wp-block-paragraph">Prefer a single command? This script asks for your domain, email, and stack (LAMP or LEMP), then installs WordPress with HTTPS automatically.</p>


<pre><code>cat <<'SCRIPT' > ~/oneclick-wp.sh
#!/usr/bin/env bash
set -euo pipefail
read -rp "Domain (e.g., example.com): " DOMAIN
read -rp "Email for Let's Encrypt: " EMAIL
read -rp "Stack [lamp|lemp]: " STACK
DB_NAME="wpdb"; DB_USER="wpuser"; DB_PASS="$(tr -dc A-Za-z0-9_@%+ | head -c 20)"

sudo apt update
if [[ "$STACK" == "lamp" ]]; then
  sudo apt -y install apache2 mysql-server php php-mysql php-fpm php-curl php-xml php-gd php-zip php-mbstring php-intl unzip certbot python3-certbot-apache
  sudo a2enmod rewrite
  sudo systemctl enable --now apache2 mysql
  sudo mysql -e "CREATE DATABASE ${DB_NAME} DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_520_ci;"
  sudo mysql -e "CREATE USER '${DB_USER}'@'localhost' IDENTIFIED BY '${DB_PASS}'; GRANT ALL ON ${DB_NAME}.* TO '${DB_USER}'@'localhost'; FLUSH PRIVILEGES;"
  cd /tmp && curl -LO https://wordpress.org/latest.tar.gz && tar -xzf latest.tar.gz
  sudo rsync -a wordpress/ /var/www/html/
  sudo chown -R www-data:www-data /var/www/html
  sudo tee /etc/apache2/sites-available/wordpress.conf >/dev/null <<EOF
&lt;VirtualHost *:80&gt;
  ServerName ${DOMAIN}
  ServerAlias www.${DOMAIN}
  DocumentRoot /var/www/html
  &lt;Directory /var/www/html&gt;AllowOverride All&lt;/Directory&gt;
&lt;/VirtualHost&gt;
EOF
  sudo a2ensite wordpress.conf &#038;&#038; sudo systemctl reload apache2
  cd /var/www/html &#038;&#038; cp wp-config-sample.php wp-config.php
  sudo sed -i "s/database_name_here/${DB_NAME}/; s/username_here/${DB_USER}/; s/password_here/${DB_PASS}/" wp-config.php
  curl -s https://api.wordpress.org/secret-key/1.1/salt/ | sudo tee -a wp-config.php >/dev/null
  sudo certbot --apache -d "${DOMAIN}" -d "www.${DOMAIN}" --redirect -m "${EMAIL}" --agree-tos -n
else
  sudo apt -y install nginx mysql-server php-fpm php-mysql php-curl php-xml php-gd php-zip php-mbstring php-intl unzip certbot python3-certbot-nginx
  sudo systemctl enable --now nginx mysql
  sudo mysql -e "CREATE DATABASE ${DB_NAME} DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_520_ci;"
  sudo mysql -e "CREATE USER '${DB_USER}'@'localhost' IDENTIFIED BY '${DB_PASS}'; GRANT ALL ON ${DB_NAME}.* TO '${DB_USER}'@'localhost'; FLUSH PRIVILEGES;"
  cd /tmp && curl -LO https://wordpress.org/latest.tar.gz && tar -xzf latest.tar.gz
  sudo mkdir -p /var/www/wordpress && sudo rsync -a wordpress/ /var/www/wordpress/
  sudo chown -R www-data:www-data /var/www/wordpress
  sudo tee /etc/nginx/sites-available/wordpress >/dev/null <<EOF
server {
  listen 80;
  server_name ${DOMAIN} www.${DOMAIN};
  root /var/www/wordpress;
  index index.php index.html;
  location / { try_files \$uri \$uri/ /index.php?\$args; }
  location ~ \.php$ { include snippets/fastcgi-php.conf; fastcgi_pass unix:/run/php/php-fpm.sock; }
}
EOF
  sudo ln -s /etc/nginx/sites-available/wordpress /etc/nginx/sites-enabled/wordpress
  sudo nginx -t &#038;&#038; sudo systemctl reload nginx
  cd /var/www/wordpress &#038;&#038; cp wp-config-sample.php wp-config.php
  sudo sed -i "s/database_name_here/${DB_NAME}/; s/username_here/${DB_USER}/; s/password_here/${DB_PASS}/" wp-config.php
  curl -s https://api.wordpress.org/secret-key/1.1/salt/ | sudo tee -a wp-config.php >/dev/null
  sudo certbot --nginx -d "${DOMAIN}" -d "www.${DOMAIN}" --redirect -m "${EMAIL}" --agree-tos -n
fi
echo "DB: ${DB_NAME}  USER: ${DB_USER}  PASS: ${DB_PASS}"
echo "Open https://${DOMAIN} to finish WordPress setup."
SCRIPT

chmod +x ~/oneclick-wp.sh
bash ~/oneclick-wp.sh
</code></pre>


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



<ul class="wp-block-list">
  <li><strong>White page / 502 errors:</strong> Check PHP-FPM/Apache status: <code>systemctl status php*-fpm apache2 nginx</code>.</li>
  <li><strong>Permalinks not working (Apache):</strong> Confirm <code>AllowOverride All</code> and that <code>mod_rewrite</code> is enabled.</li>
  <li><strong>SSL issuance fails:</strong> Confirm DNS A/AAAA records point to your server and re-run Certbot with <code>--apache</code> or <code>--nginx</code>.</li>
</ul>



<p class="wp-block-paragraph">Need a faster start? Choose a low-cost, instant <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">That’s it—your small business WordPress site is live with modern PHP, a secure database, and free SSL on high-performance ServerStadium hardware. 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/simple-wordpress-ubuntu-24-04-dedicated-servers/">One-Click WordPress on Ubuntu 24.04 for Small Business Sites</a> appeared first on <a href="https://serverstadium.com">ServerStadium</a>.</p>
]]></content:encoded>
					
		
		
			</item>
	</channel>
</rss>
