Many WordPress sites begin their life on shared hosting. It’s cheap, convenient, and quick to set up. However, as traffic increases, plugins accumulate, and performance expectations rise, shared hosting quickly reveals its limitations: sluggish page loads, erratic uptime, and limited control over optimisation.
For businesses that take their website seriously — whether it’s a brochure site, a WooCommerce store, or a platform supporting workflow applications — these limitations become unacceptable. That’s where OpenLiteSpeed (OLS) on Oracle Cloud Infrastructure (OCI) comes in. It offers the speed, scalability, and control of a dedicated environment without enterprise-level costs. And, with Arm-based Ampere servers, it does so more efficiently than many traditional x86 setups.
In this guide, we’ll walk through the process of migrating a WordPress site to OpenLiteSpeed on Oracle Cloud. We’ll cover everything from preparation to optimisation, with a focus on practical steps and common pitfalls. By the end, you’ll see not only how to make the move but why it’s worth doing.
1. Pre-Migration Checks
Before you touch a server, preparation is essential.
Backups
- Take a full backup of your WordPress files and database. Use a plugin (e.g., UpdraftPlus, All-in-One WP Migration) or manual methods via cPanel/SSH.
- Store the backup both locally and in cloud storage (Google Drive, Dropbox, S3).
Plugin and Theme Compatibility
- Ensure your themes and plugins are compatible with PHP 8.2/8.3 (at the time of posting), which you’ll likely run on OpenLiteSpeed.
- Check for any caching or security plugins that may conflict with server-level caching.
DNS Planning
- Lower the TTL (Time to Live) of your DNS records to 60 seconds (1 minute). This will allow for faster propagation when you switch the site over.
- Identify all subdomains (e.g., shop.example.com, cdn.example.com) so nothing is missed.
Access Requirements
- Make sure you have SSH access and sudo privileges on the new OCI instance.
- Gather your WordPress admin credentials and database details.
2. Provisioning the Oracle Cloud Instance
Log in to your Oracle Cloud account and provision a new compute instance.
Choosing the Shape
- Select an Ampere A1 Flexible instance (VM.Standard.A1.Flex). These provide Arm-based processors with excellent performance per core and energy efficiency.
- Allocate at least 4 OCPUs and 8 GB RAM for medium-sized WordPress sites. Scale up for heavy WooCommerce stores or multi-site networks.
Operating System
- Choose Oracle Linux 9. It’s stable, secure, and well-supported for enterprise workloads.
Networking
- Ensure ports 80 (HTTP) and 443 (HTTPS) are open in your VCN security list.
- Assign a reserved public IP if you want consistency for DNS.
- Request the reverse IP lookup from OCI.
Storage
- Use a balanced block volume (minimum 50 GB) for the OS. Consider using RAID for redundancy if you are running multiple disks for your data. With OCI, the larger the disk, the faster it is, up to 1.2 TB. Our server often used two 1.2TB ultra-fast Disks in a RAID array. If you assign 16 or more processors to your machine, then iSCSI can connect using “multi-path”, which is faster.
3. Installing OpenLiteSpeed and Dependencies
Once your instance is ready, SSH into the server:
ssh opc@your-server-ip
Update the System
sudo dnf update -y
Install OpenLiteSpeed
sudo rpm -Uvh http://rpms.litespeedtech.com/centos/litespeed-repo-1.1-1.el8.noarch.rpm
sudo dnf install openlitespeed -y
Install PHP
sudo dnf install lsphp82 lsphp82-mysqlnd lsphp82-common lsphp82-gd lsphp82-process lsphp82-mbstring lsphp82-xml lsphp82-json -y
Install Database
- For most WordPress sites, MariaDB is recommended:
sudo dnf install mariadb-server -y
sudo systemctl enable --now mariadb
- Run the secure installation:
sudo mysql_secure_installation
4. Configuring the Database
Log in to MariaDB:
sudo mysql -u root -p
Create a new database and user:
CREATE DATABASE wordpress_db;
CREATE USER 'wp_user'@'localhost' IDENTIFIED BY 'strong_password';
GRANT ALL PRIVILEGES ON wordpress_db.* TO 'wp_user'@'localhost';
FLUSH PRIVILEGES;
EXIT;
You’ll use these credentials in the WordPress configuration later.
5. Migrating WordPress Files
There are several methods for migrating WordPress. Here’s a manual approach:
Export Database from Old Host
mysqldump -u olduser -p olddb > site.sql
Transfer Files
Compress your site files and move them:
tar -czvf site.tar.gz public_html/
scp site.tar.gz opc@your-server-ip:/home/opc/
scp site.sql opc@your-server-ip:/home/opc/
Extract Files on New Server
sudo mkdir -p /var/www/html
sudo tar -xzvf site.tar.gz -C /var/www/html/
Import Database
mysql -u wp_user -p wordpress_db < site.sql
6. Configuring WordPress
Edit wp-config.php in your WordPress root directory:
define( 'DB_NAME', 'wordpress_db' );
define( 'DB_USER', 'wp_user' );
define( 'DB_PASSWORD', 'strong_password' );
define( 'DB_HOST', 'localhost' );
Check file ownership and permissions:
sudo chown -R nobody:nogroup /var/www/html
sudo find /var/www/html -type d -exec chmod 755 {} \;
sudo find /var/www/html -type f -exec chmod 644 {} \;
7. Configuring OpenLiteSpeed for WordPress
Access the OLS WebAdmin console:
sudo /usr/local/lsws/admin/misc/admpass.sh
Log in at https://your-server-ip:7080.
- Set document root to /var/www/html.
- Configure the PHP handler to use, eg, lsphp82.
- Restart OLS:
sudo systemctl restart lsws
8. Enabling SSL and Security
Install Certbot:
sudo dnf install certbot -y
Generate a Let’s Encrypt certificate:
sudo certbot certonly --webroot -w /var/www/html -d example.com -d www.example.com
Configure OLS listener to use SSL certificate paths:
/etc/letsencrypt/live/example.com/fullchain.pem
/etc/letsencrypt/live/example.com/privkey.pem
Set up automatic renewal:
sudo systemctl enable certbot-renew.timer
9. Optimisation
OpenLiteSpeed Cache Plugin
- Install and activate the LiteSpeed Cache plugin in WordPress.
- Enable page caching, image optimisation, and object caching.
Cloudflare CDN
- Point your DNS to Cloudflare.
- Enable caching, Brotli compression, and security filters.
PHP and Database Tuning
- Adjust PHP memory limits and execution times in the OLS panel.
- Tune MariaDB with sensible defaults: larger buffer pool, query cache disabled, slow query logging enabled. Try MySQL Tuner — we think it is great.
Monitoring
- Use OLS’s built-in monitoring and Oracle Cloud metrics.
- Add Fail2ban for brute-force protection.
10. Testing and Troubleshooting
Before switching DNS, test using your hosts file:
sudo nano /etc/hosts
# Add: your-server-ip example.com www.example.com
Visit the site locally and check:
- Pages load correctly.
- SSL is valid.
- Admin login works.
- Images and static files serve without errors.
Common issues:
- 500 errors – usually permissions or PHP module mismatches.
- Mixed content – update WordPress settings to enforce HTTPS.
- Slow backend – increase PHP workers, enable object cache.
11. Switching DNS
Once satisfied, update your domain’s A record to point to the OCI instance’s IP address. Thanks to the earlier TTL change, propagation should be quick.
Test globally with tools like dig
or dnschecker.org.
Important Caveat
The commands and configurations in this guide are provided as examples. They should always be checked carefully before use, as they may need to be adapted for your specific environment or may have changed since this article was written.
There are several other measures we take to optimise and harden the server and website, which are not covered here.
Final Reflection
Migrating WordPress to OpenLiteSpeed on Oracle Cloud may seem complex, but each step follows a clear logic: prepare, provision, migrate, configure, optimise, and test. The result is a site that loads faster, handles traffic more reliably, and gives you far greater control than shared hosting ever could.
More importantly, it provides a foundation. Whether you’re running a simple site, a WooCommerce store, or a bespoke workflow application, this setup ensures your hosting is an asset rather than a bottleneck. Performance, scalability, and security aren’t optional extras — they’re built into the stack from day one.
For SMEs and growing enterprises alike, that’s the difference between “just hosting a website” and building a platform fit for the future.