Migrating to VPS: A Beginner's Guide for African Enterprises
Published: · Updated: · 4 min read · By Oluniyi D. Ajao
Why migrate to VPS?
This beginner's guide helps African enterprises understand when and how to migrate from shared hosting to VPS. If your website or application is slowing down, timing out during traffic spikes, or needs stronger security controls, it's time to consider a Virtual Private Server (VPS). With AFRICLOUD VPS, you get dedicated resources, NVMe storage, and full root access to scale on your terms.
Shared hosting works well for small websites with predictable traffic. However, as your business grows, you'll encounter limitations that only a VPS can solve. Unlike shared hosting where hundreds of sites compete for the same CPU and memory, a VPS guarantees your allocated resources are always available.
When is the right time?
Recognising the signs that you've outgrown shared hosting is crucial. Here are the key indicators:
- Resource limits: You're hitting CPU/RAM limits on shared hosting, causing slow page loads or 503 errors
- Custom software needs: You need software unavailable on shared hosting (e.g., Redis, Node.js, Docker, custom PHP extensions)
- Security requirements: Compliance or security policies demand isolated environments with dedicated IP addresses
- Growing traffic: Traffic is growing across Africa and nearby markets, requiring more headroom for peaks
- E-commerce expansion: Your online store needs reliable checkout performance during promotions
See how proximity boosts performance in our analysis: VPS proximity business cases. If you sell online, NVMe speed matters too: NVMe and e‑commerce performance.
Pre-migration checklist
A thorough audit before migration prevents surprises. Work through this checklist methodically:
- Audit your stack: Document PHP/Node.js version, database type and size, cron jobs, and background processes
- Back up everything: Create complete backups of files, database, .env files, SSL certificates, and API keys
- List integrations: Document all external services—payment gateways, SMTP providers, analytics, webhooks, and third-party APIs
- Check DNS TTL: Lower your DNS TTL to 300 seconds (5 minutes) a week before migration to enable quick cutover
- Plan cutover window: Choose low-traffic hours (typically late night or early morning) and notify stakeholders in advance
- Document custom configurations: Note any .htaccess rules, PHP settings, or server configurations you've customised
Use AFRICLOUD's network and support pages to pick the best region and get help.
Choose the right plan
Selecting the right VPS plan depends on your workload. Here's how to decide:
- Small sites and blogs: 2 vCPU, 4GB RAM handles WordPress and similar CMS with moderate traffic
- E-commerce stores: 4+ vCPU, 8GB+ RAM provides headroom for database queries and checkout peaks
- API backends: Focus on CPU cores for concurrent request handling
- Media-heavy sites: Prioritise storage space and consider CDN integration
Start with a balanced CPU/RAM plan and scale vertically as usage grows—AFRICLOUD allows seamless upgrades without data migration. Need WordPress? Compare options in WordPress hosting options. Building for Europe? Consider Lisbon VPS for low-latency access.
Step-by-step migration
Follow these steps for a smooth migration with minimal downtime:
- Provision your VPS: Select the nearest region (Lisbon for West/North Africa and Europe; Johannesburg for Southern/East Africa)
- Harden the server: Create a non-root user with sudo privileges, configure UFW firewall to allow only necessary ports (22, 80, 443), and enable automatic security updates
- Install your stack: Set up your web server (NGINX or Apache), PHP-FPM or Node.js runtime, and database server (MySQL/MariaDB or PostgreSQL)
- Transfer files: Use rsync over SSH for efficient file transfer:
rsync -avz -e ssh /local/path user@vps:/remote/path - Restore database: Import your database backup and verify data integrity
- Configure environment: Set environment variables, regenerate application keys, and update database connection strings
- Test thoroughly: Use a temporary domain or hosts file override to test all functionality before switching DNS
- Switch DNS: Update your domain's A/AAAA records to point to your new VPS IP address
Before you flip DNS, validate external services and cron jobs. For network testing during rollout, our Looking Glass helps verify routing and latency.
Common migration issues and solutions
Even with careful planning, you may encounter these common issues:
- Permission errors: Ensure web server user (www-data or nginx) owns application files:
chown -R www-data:www-data /var/www - Database connection failures: Verify database credentials in .env files and check MySQL user permissions
- Email delivery problems: Configure SPF, DKIM, and DMARC records for your new IP address
- Missing PHP extensions: Install required extensions:
apt install php8.2-mysql php8.2-gd php8.2-curl - SSL certificate issues: Use Let's Encrypt with Certbot for free, auto-renewing certificates
Post-migration best practices
After successful migration, implement these practices to maintain security and performance:
- Enable HTTPS everywhere: Configure HTTPS and enable HSTS headers for secure connections
- Implement backups: Set up automated daily backups to off-site storage (S3-compatible or rsync to backup server)
- Configure monitoring: Set up uptime monitoring and resource alerts to catch issues before they affect users
- Use a CDN: Offload static assets to a CDN for faster delivery and reduced server load
- Track Core Web Vitals: Monitor page speed metrics to maintain SEO rankings and user experience
- Schedule security updates: Enable unattended-upgrades for automatic security patching
Ready to move? Order your VPS and follow this guide. If you need help, our support team is ready to assist.
Further reading
External resources for deeper learning:
- RFC 9116: Security.txt for operational security hygiene
- DigitalOcean: Initial Server Setup for Linux fundamentals
- Let's Encrypt: Getting Started for free SSL certificates