Why Choose WordPress and RamNode?
WordPress Benefits:
- • Powers 40%+ of all websites globally
- • Thousands of themes and plugins available
- • Easy content management interface
- • SEO-friendly and mobile responsive
- • Strong community support
RamNode + Nginx Advantages:
- • High-performance SSD storage
- • Nginx for superior performance
- • Free SSL certificates with Let's Encrypt
- • Full root access for customization
- • Cost-effective hosting solution
Prerequisites
Before starting, ensure you have:
Server Requirements
- • RamNode VPS (Ubuntu 22.04 LTS recommended)
- • Domain name pointed to your server IP
- • SSH access to your server
- • At least 1GB RAM (2GB+ recommended)
Knowledge Requirements
- • Basic Linux command line skills
- • Understanding of web servers
- • Domain DNS management
Initial Server Setup
Connect to your RamNode VPS and prepare the system:
ssh root@your-server-ipapt update && apt upgrade -yapt install curl wget unzip software-properties-common -y💡 Tip: Replace "your-server-ip" with your actual RamNode VPS IP address.
Install Nginx Web Server
Install and configure Nginx as the web server:
apt install nginx -ysystemctl start nginx
systemctl enable nginx
systemctl status nginxufw allow 'Nginx Full'
ufw allow OpenSSH
ufw --force enable✅ You can now visit your server's IP address to see the Nginx welcome page.
Install MySQL Database
Install MySQL server for WordPress data storage:
apt install mysql-server -ymysql_secure_installationFollow the prompts to:
- Set up VALIDATE PASSWORD component (recommended: Y)
- Set password validation policy (Medium recommended)
- Set a strong root password
- Remove anonymous users (Y)
- Disallow root login remotely (Y)
- Remove test database (Y)
- Reload privilege tables (Y)
mysql -u root -pInstall PHP
Install PHP and required extensions for WordPress:
apt install php8.1-fpm php8.1-mysql php8.1-curl php8.1-gd php8.1-mbstring \
php8.1-xml php8.1-zip php8.1-intl php8.1-bcmath php8.1-soap \
php8.1-imagick php8.1-readline php8.1-common php8.1-cli -ysystemctl start php8.1-fpm
systemctl enable php8.1-fpm
systemctl status php8.1-fpmnano /etc/php/8.1/fpm/php.iniUpdate these PHP settings for better performance:
memory_limit = 256M
upload_max_filesize = 64M
post_max_size = 64M
max_execution_time = 300
max_input_vars = 3000systemctl restart php8.1-fpmConfigure Nginx for WordPress
Create Nginx virtual host configuration for your domain:
nano /etc/nginx/sites-available/your-domain.comAdd the following configuration (replace your-domain.com with your actual domain):
server {
listen 80;
listen [::]:80;
root /var/www/html/your-domain.com;
index index.php index.html index.htm;
server_name your-domain.com www.your-domain.com;
client_max_body_size 100M;
location / {
try_files $uri $uri/ /index.php?$args;
}
location ~ \.php$ {
include snippets/fastcgi-php.conf;
fastcgi_pass unix:/var/run/php/php8.1-fpm.sock;
}
location ~ /\.ht {
deny all;
}
location = /favicon.ico {
log_not_found off;
access_log off;
}
location = /robots.txt {
log_not_found off;
access_log off;
allow all;
}
location ~* \.(css|gif|ico|jpeg|jpg|js|png)$ {
expires 1y;
add_header Cache-Control "public, immutable";
log_not_found off;
}
}ln -s /etc/nginx/sites-available/your-domain.com /etc/nginx/sites-enabled/
nginx -t
systemctl reload nginxmkdir -p /var/www/html/your-domain.com
chown -R www-data:www-data /var/www/html/your-domain.comDownload WordPress
Download and extract WordPress to your web directory:
cd /tmp
wget https://wordpress.org/latest.tar.gz
tar xzf latest.tar.gzcp -R wordpress/* /var/www/html/your-domain.com/
chown -R www-data:www-data /var/www/html/your-domain.com
chmod -R 755 /var/www/html/your-domain.comcd /var/www/html/your-domain.com
cp wp-config-sample.php wp-config.phpConfigure MySQL Database
Create a MySQL database and user for WordPress:
mysql -u root -pCREATE DATABASE wordpress_db;
CREATE USER 'wordpress_user'@'localhost' IDENTIFIED BY 'strong_password_here';
GRANT ALL PRIVILEGES ON wordpress_db.* TO 'wordpress_user'@'localhost';
FLUSH PRIVILEGES;
EXIT;nano /var/www/html/your-domain.com/wp-config.phpUpdate the database configuration in wp-config.php:
define('DB_NAME', 'wordpress_db');
define('DB_USER', 'wordpress_user');
define('DB_PASSWORD', 'strong_password_here');
define('DB_HOST', 'localhost');
define('DB_CHARSET', 'utf8mb4');
define('DB_COLLATE', '');curl -s https://api.wordpress.org/secret-key/1.1/salt/Copy the generated keys and replace the placeholder values in wp-config.php.
Complete WordPress Setup
Complete the WordPress installation through the web interface:
🌐 Web Setup: Visit http://your-domain.com in your browser to complete the WordPress installation.
Fill out the WordPress installation form with:
- Site Title: Your website name
- Username: Admin username (avoid "admin")
- Password: Strong password
- Email: Your email address
- Search Engine Visibility: Check if you don't want search engines to index yet
🎉 Success: WordPress is now installed! You can access the admin area at /wp-admin/
Install SSL Certificate
Secure your WordPress site with a free SSL certificate from Let's Encrypt:
apt install snapd -y
snap install core; snap refresh core
snap install --classic certbotln -s /snap/bin/certbot /usr/bin/certbotcertbot --nginx -d your-domain.com -d www.your-domain.comFollow the prompts to:
- Enter your email address
- Agree to terms of service
- Choose whether to share email with EFF
- Select redirect option (recommended: 2)
certbot renew --dry-run🔒 SSL Active: Your WordPress site is now secured with HTTPS!
Security Hardening
Implement additional security measures for your WordPress installation:
nano /etc/nginx/nginx.confAdd this line to the http block:
server_tokens off;nano /var/www/html/your-domain.com/.htaccess# Block access to wp-config.php
<Files wp-config.php>
order allow,deny
deny from all
</Files>
# Block access to xmlrpc.php
<Files xmlrpc.php>
order allow,deny
deny from all
</Files>
# Disable directory browsing
Options -Indexes
# Block suspicious requests
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{QUERY_STRING} (<|%3C).*script.*(>|%3E) [NC,OR]
RewriteCond %{QUERY_STRING} GLOBALS(=|[|%[0-9A-Z]{0,2}) [OR]
RewriteCond %{QUERY_STRING} _REQUEST(=|[|%[0-9A-Z]{0,2})
RewriteRule ^(.*)$ index.php [F,L]
</IfModule>nano /var/www/html/your-domain.com/wp-config.phpAdd these security settings to wp-config.php:
// Disable file editing from WordPress admin
define('DISALLOW_FILE_EDIT', true);
// Force SSL
define('FORCE_SSL_ADMIN', true);
// Limit login attempts
define('WP_FAIL2BAN_BLOCKED_USERS', array('admin', 'administrator'));
// Hide WordPress version
remove_action('wp_head', 'wp_generator');Performance Optimization
Optimize your WordPress site for better performance:
apt install redis-server -y
systemctl enable redis-server
systemctl start redis-servernano /etc/nginx/sites-available/your-domain.comAdd caching configuration to your Nginx virtual host:
# Add to server block
location ~* \.(jpg|jpeg|png|gif|ico|css|js|pdf)$ {
expires 1y;
add_header Cache-Control "public, immutable";
add_header Vary Accept-Encoding;
access_log off;
}
# Enable Gzip compression
gzip on;
gzip_vary on;
gzip_min_length 1024;
gzip_proxied expired no-cache no-store private auth;
gzip_types
text/plain
text/css
text/xml
text/javascript
application/javascript
application/xml+rss
application/json;nginx -t && systemctl reload nginx🚀 Recommended: Install a WordPress caching plugin like WP Rocket, W3 Total Cache, or WP Super Cache for additional performance gains.
Troubleshooting
Next Steps & Recommendations
Essential WordPress Plugins
- • Security: Wordfence Security, Sucuri, or iThemes Security
- • SEO: Yoast SEO or RankMath
- • Caching: WP Rocket, W3 Total Cache, or WP Super Cache
- • Backup: UpdraftPlus, BackupBuddy, or Jetpack Backup
- • Performance: Smush (image optimization), Lazy Load
Maintenance Tasks
- • Regular WordPress, theme, and plugin updates
- • Weekly database optimization
- • Daily automated backups
- • Monthly security scans
- • Performance monitoring and optimization
