Build a WordPress Server from Scratch
Set up a full LAMP stack on Ubuntu and deploy a working WordPress site.
Introduction
30 Second Summary
Most college websites run on WordPress. Behind the scenes, someone has to set up and maintain the Linux server that makes it all work. That someone could be you.
In this project, you will build a complete WordPress server from scratch inside a virtual machine on your Windows PC. You will install the operating system, configure every layer of the server stack, deploy WordPress, and see your site live in the browser.
What You'll Build
Type an IP address into your Windows browser and watch a fully working WordPress site load from a Linux server you built yourself.
By the end of this project, you'll have:
- A Linux server you built yourself, running inside VirtualBox on your Windows PC and reachable from your browser just like a real college server on the network.
- A live WordPress site you can log into and manage, backed by a MariaDB database with a dedicated user following least-privilege security.
- The hands-on experience of hitting a real Apache configuration problem, diagnosing why WordPress won't load, and fixing it yourself.
- Secret Mission: Secure your site with HTTPS by generating a self-signed SSL certificate and configuring encrypted connections.
Are there any prerequisites?
You need a Windows PC with at least 8 GB of RAM and 25 GB of free disk space. You should be familiar with WordPress as a user (the admin dashboard, plugins, themes) and have basic awareness of the Linux command line (cd, ls, nano).
Before We Start
Before we dive in, let's lock in what you're about to build and why it matters. This is your moment to commit to the goal before any hands-on work begins.
Set Up VirtualBox and Ubuntu Server
You need a Linux server to work with, but you do not have one sitting on your desk. VirtualBox lets you run a full Ubuntu Server on your Windows machine for free, simulating the experience of managing a remote college server.
In this step, you will install VirtualBox, create a virtual machine, and install Ubuntu Server 24.04 inside it. By the end, you will have a running Linux server accessible from your Windows terminal.
In this step, get ready to:
- Install Oracle VirtualBox and download the Ubuntu Server ISO.
- Create and configure a virtual machine named CollegeWebServer.
- Install Ubuntu Server 24.04 and note your VM's IP address.
Download and install VirtualBox
VirtualBox is the software that creates and runs virtual machines on your Windows PC. Let's check whether you already have it installed.
- Press the Windows key to open your search bar.
- Type VirtualBox and look at the results.
✔️ I see VirtualBox 7.2 or higher
You already have the right version installed. Skip ahead to the Ubuntu ISO download below.
ⓧ I see an older version of VirtualBox
You need version 7.2 or higher for this project. The installer will upgrade your existing version in place.
- Open your browser and navigate to the VirtualBox downloads page:
- https://www.virtualbox.org/wiki/Downloads
- Click Windows hosts to download the installer.
- Run the downloaded .exe file and accept the defaults at each prompt.
- Click Yes if Windows asks for permission to make changes.
- Click Finish when the installer completes.
VirtualBox will open automatically after installation.
ⓧ I don't see VirtualBox in search results
VirtualBox is not installed yet. Let's install it now.
- Open your browser and navigate to the VirtualBox downloads page:
- https://www.virtualbox.org/wiki/Downloads
- Click Windows hosts to download the installer.
- Run the downloaded .exe file and accept the defaults at each prompt.
- The installer will ask permission to install network adapters. Click Yes to allow this.
- Click Yes if Windows asks for permission to make changes.
- Click Finish when the installer completes.
VirtualBox will open automatically after installation.
What is VirtualBox?
VirtualBox is a free, open-source tool from Oracle that creates virtual machines on your computer. A virtual machine acts like a separate computer running inside your existing one, with its own operating system, its own storage, and its own network address.
Now download the Ubuntu Server ISO file that you will install inside the virtual machine.
- Open a new browser tab and navigate to the Ubuntu Server ISO download:
- https://releases.ubuntu.com/noble/ubuntu-24.04.4-live-server-amd64.iso
- The download will start automatically. The file is approximately 3.2 GB, so it may take several minutes depending on your connection speed.
- Wait for the download to finish before continuing to the next substep.
Save time while downloading
The ISO download can take a while. While it downloads, you can read ahead through the next substep to familiarise yourself with the VM creation steps.
Create the CollegeWebServer virtual machine
With VirtualBox installed and the ISO downloaded, you can now create the virtual machine that will become your Linux server.
- Open VirtualBox Manager (it may already be open from the install step).
- Click New in the toolbar to create a new virtual machine.
- In the Name field, type CollegeWebServer.
- Set Type to Linux.
- Set Version to Ubuntu (64-bit).
- Set Memory size to 2048 MB.
- Under Hard disk, select Create a virtual hard disk now and click Create.
- Accept the default disk type (VDI) and choose Dynamically allocated.
- Set the disk size to 20 GB and click Create.
You should now see CollegeWebServer listed in the VirtualBox Manager sidebar.
Next, configure the network so your Windows browser can reach the VM directly.
- Select CollegeWebServer in the sidebar and click Settings.
- Click Network in the left panel.
- Under Adapter 1, change Attached to from NAT to Bridged Adapter.
- Click OK to save the settings.
Why Bridged Adapter?
Bridged Adapter gives your VM its own IP address on your local network, just like a real computer plugged into your router. This means your Windows browser can reach the VM directly by typing its IP address.
The default NAT mode hides the VM behind your Windows machine, making it much harder to access from a browser.
Now attach the Ubuntu ISO so the VM can boot from it.
- Select CollegeWebServer and click Settings again.
- Click Storage in the left panel.
- Under Controller: IDE, click the disc icon labelled Empty.
- On the right side, click the small disc icon next to Optical Drive and select Choose a disk file.
- Navigate to your Downloads folder and select the ubuntu-24.04.4-live-server-amd64.iso file.
- Click OK to save the settings.
Your VM is now configured and ready to boot. You should see the ISO file name listed under Storage in the VM details.
Don't see Controller: IDE?
Some VirtualBox versions label it Controller: SATA instead. Look for any disc/optical entry under Storage and click it. The important thing is selecting the ISO file for the optical drive.
If you do not see any optical drive at all, click the small Add optical drive icon (a disc with a plus sign) at the bottom of the Storage panel to add one.
Install Ubuntu Server on the VM
Time to boot the VM and install Ubuntu Server. The installer is text-based, meaning you navigate with your arrow keys and Enter key.
- Select CollegeWebServer in VirtualBox Manager and click Start.
- A new window opens showing the VM booting from the Ubuntu ISO.
- When the language selection screen appears, choose English and press Enter.
What prompts will I see?
The Ubuntu Server installer walks you through several screens. For most of them, you accept the defaults by pressing Enter or selecting Done. Here is what to expect at each screen:
- Installer update: if offered, select Continue without updating.
- Keyboard layout: accept the default and select Done.
- Network: the installer auto-configures via DHCP. Select Done.
- Proxy: leave blank and select Done.
- Mirror: accept the default and select Done.
- Storage: leave "Use an entire disk" checked and select Done. Confirm when prompted.
- Profile: this is where you set your username and password (next bullet below).
- SSH and snaps: select Done for both.
- Work through the installer screens, accepting defaults for keyboard, network, proxy, mirror, and storage.
- On the Profile setup screen, fill in the following:
- Set Your name to webadmin.
- Set Your server's name to collegewebserver.
- Set Pick a username to webadmin.
- Choose a password you will remember and confirm it.
- Select Done on the SSH and Featured snaps screens without making changes.
- Wait for the installation to complete. You will see log messages scrolling. This takes 5-10 minutes.
- When you see Reboot Now, select it and press Enter.
VM gets stuck on "Please remove the installation medium"?
If the VM asks you to remove the installation medium, just press Enter. VirtualBox automatically ejects the ISO on reboot in most cases.
If it boots back into the installer instead of the login screen, power off the VM, go to Settings > Storage, right-click the ISO, and select Remove Disk from Virtual Drive. Then start the VM again.
ask me for help troubleshooting VirtualBox boot issues
After the reboot, you will see a text-based login prompt.
- Log in with username webadmin and the password you chose during installation.
You are now inside your Ubuntu Server. The last thing to do is find your VM's IP address so you can reach it from your Windows browser.
- Find your VM's IP address by running this command:
ip addr show
How do I read the output?
Look for a section that mentions your network adapter (usually enp0s3 or similar). Find the line that starts with inet followed by a number like 192.168.1.105/24. The part before the / is your VM's IP address.
Write this IP address down. You will use it throughout the rest of this project to access your server from Windows.
Before you move on, let's confirm Ubuntu installed correctly. What do you think the following command will show you?
- Verify your Ubuntu installation by running:
cat /etc/os-release
You should see output that includes Ubuntu 24.04 in the VERSION_ID and PRETTY_NAME lines. This confirms your server is running the correct version.
Not seeing Ubuntu 24.04?
If the command returns an error or shows a different version, double-check that you downloaded the correct ISO file (ubuntu-24.04.4-live-server-amd64.iso) and that the installation completed without errors.
ask me for help with my Ubuntu Server installation
Your Linux server is up and running. Next up, you will install Apache and see your server respond to a browser request from Windows.
Install Apache and See Your Server in the Browser
Your Ubuntu Server VM is running and you have its IP address. Now you need something to actually serve web pages.
Apache is the web server software that will deliver your WordPress site to anyone who visits. Installing it and seeing a page load in your Windows browser is the fastest proof that your server is alive, reachable, and ready to serve content.
In this step, get ready to:
- Install Apache on your Ubuntu Server.
- Confirm Apache is running from the terminal.
- View the default Apache page from your Windows browser.
Update packages and install Apache
Before installing any software on Linux, you update the package list so your system knows about the latest available versions. Then you install Apache in a single command.
- In your VM terminal (logged in as webadmin), update the package list and install Apache by running this command:
sudo apt update && sudo apt install apache2 -y
What does this command do?
- sudo apt update refreshes the list of available packages from Ubuntu's servers so you get the latest version.
- && chains the two commands together. The second command only runs if the first one succeeds.
- sudo apt install apache2 -y installs the Apache web server. The -y flag automatically confirms the installation so you do not have to type "yes" manually.
The install will print several lines as it downloads and configures Apache. When it finishes, you are returned to the command prompt.
- Verify Apache is running by checking its service status:
sudo systemctl status apache2
You should see a line that reads Active: active (running) in green text. This confirms Apache started automatically after installation.
Exit the status view
The systemctl status output may take over your terminal. Press q to exit and return to the command prompt.
Not seeing active (running)?
- If you see "inactive (dead)", start Apache manually with sudo systemctl start apache2 and then re-check the status.
- If the install command failed with a network error, your VM may not have internet access. Confirm the Network adapter is set to Bridged Adapter in VirtualBox settings and try again.
- help me troubleshoot why Apache is not running on my Ubuntu Server VM
See the default page from your Windows browser
Apache is running inside your VM, but the real test is whether your Windows machine can reach it over the network. Because you set the VM's network adapter to Bridged Adapter in Step 1, your VM has its own IP address on your local network.
- Switch to your Windows machine and open any web browser (Chrome, Edge, Firefox).
- In the address bar, type the following URL using the IP address you noted in Step 1:
http://[[VM_IP="your VM's IP address from Step 1"]]
Before you press Enter, take a guess. What do you think you will see?
You should see a page titled Apache2 Ubuntu Default Page with the text "It works!" near the top.
What does this page prove?
This default page is Apache's built-in test page. Seeing it in your Windows browser proves three things at once: Apache is running, your VM is reachable from your host machine, and port 80 (HTTP) is open.
You will replace this page with WordPress in a later step.
Page not loading in your browser?
- Double-check the IP address. Return to your VM terminal and run ip addr show to confirm the address.
- Make sure you typed http:// (not https://). HTTPS is not configured yet.
- Confirm the VM's network adapter is set to Bridged Adapter in VirtualBox. If it is set to NAT, your Windows browser cannot reach the VM directly.
- help me troubleshoot why I cannot reach my Ubuntu VM's Apache page from my Windows browser
Your web server is live and reachable. Next up, you will set up the database that WordPress needs to store all its content.
Set Up MariaDB and Create the WordPress Database
Your server is now live and delivering web pages to your browser. The next layer your WordPress site needs is a database.
WordPress stores everything (posts, pages, users, settings) in a database. MariaDB is a database server that ships with Ubuntu 24.04 and is officially recommended by WordPress. In this step, you will install MariaDB, lock it down, and create a dedicated database and user for WordPress.
In this step, get ready to:
- Install and secure MariaDB on your server.
- Create a WordPress database and a dedicated database user following least-privilege principles.
- Verify the database exists and is ready for WordPress.
Install and secure MariaDB
MariaDB is a drop-in replacement for MySQL that Ubuntu 24.04 includes in its default repositories. Installing it gives your server a production-ready database engine.
- Install MariaDB by running this command in your VM terminal:
sudo apt install mariadb-server -y
You will see package download and installation output. MariaDB starts automatically after installation.
- Confirm MariaDB is running by checking its status:
sudo systemctl status mariadb
You should see active (running) in green text.
Seeing package errors?
If you see errors about unresolved packages, run sudo apt update first to refresh your package lists, then retry the install command.
Help me troubleshoot this
Now you need to harden the installation. MariaDB ships with a built-in security script that removes unsafe defaults.
What will the security script ask?
The script is interactive. It will walk you through several prompts. Here is what to expect and how to answer each one:
- Enter current password for root: press Enter (there is no password yet).
- Switch to unix_socket authentication: enter Y to keep unix_socket active.
- Change the root password: enter Y and type a strong password when prompted.
- Remove anonymous users: enter Y.
- Disallow root login remotely: enter Y.
- Remove test database and access to it: enter Y.
- Reload privilege tables now: enter Y.
- Run the security script:
sudo mysql_secure_installation
- Answer each prompt as described in the callout above.
- When the script finishes, you will see a message confirming your MariaDB installation is now secure.
Why unix_socket authentication?
Unix socket authentication means only the Linux root user (via sudo) can connect to the MariaDB root account. No password is accepted over the network. This is the most secure method for local server administration.
Script says 'Access denied'?
Make sure you are running the command with sudo. Without sudo, you do not have the system privileges needed to connect to MariaDB's root account.
Help me fix this error
Create the WordPress database and user
WordPress needs its own database and a dedicated user that can only access that one database. This follows the principle of least privilege: the WordPress user has no access to any other database on the server.
- Log in to the MariaDB shell by running:
sudo mariadb
You will see the MariaDB prompt appear, confirming you are connected.
- Create the WordPress database by running this SQL command:
-- Create a database for WordPress with full Unicode support
CREATE DATABASE wordpress_db DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
Why utf8mb4?
The utf8mb4 character set supports all Unicode characters including emoji. This is the modern WordPress standard for database encoding.
- Create a dedicated user for WordPress and grant it access by running these commands:
-- Create a dedicated user for WordPress
CREATE USER 'wp_user'@'localhost' IDENTIFIED BY 'your-strong-password-here';
-- Grant this user full access to the WordPress database only
GRANT ALL PRIVILEGES ON wordpress_db.* TO 'wp_user'@'localhost';
-- Apply the privilege changes
FLUSH PRIVILEGES;
What do these commands do?
- CREATE USER creates a user called wp_user that can only connect from the local machine (localhost).
- GRANT ALL PRIVILEGES gives wp_user full control of wordpress_db but no access to any other database on the server.
- FLUSH PRIVILEGES tells MariaDB to reload the permissions immediately.
Choose a strong password
Replace your-strong-password-here with an actual strong password. Write it down somewhere safe. You will need this exact password again in the next step when you configure WordPress.
- Exit the MariaDB shell by running:
EXIT;
Seeing a syntax error?
Make sure each SQL statement ends with a semicolon. Missing the final ; will cause MariaDB to wait for more input instead of executing the command.
Help me fix my SQL syntax
Verify the database exists
Before you move on, confirm that your database was created successfully.
- Before you run the next command, what do you expect to see in the output?
- Verify the database exists by running:
sudo mariadb -e "SHOW DATABASES;"
You should see wordpress_db in the list of databases, alongside the default system databases like information_schema and mysql.
Don't see wordpress_db?
If wordpress_db does not appear, log back in with sudo mariadb and run the CREATE DATABASE command again. Check that you typed the database name exactly as shown and included the semicolon at the end.
Help me troubleshoot my database
Your database layer is ready. MariaDB is running, locked down, and has a dedicated database waiting for WordPress. Next up, you will install PHP and deploy the WordPress files onto the server.
Install PHP and Deploy WordPress Files
WordPress is written in PHP, a server-side scripting language. Your Ubuntu server needs PHP installed along with several extensions that WordPress depends on for database connections, image processing, and string handling.
In this step, you'll install PHP, download WordPress directly from wordpress.org, and configure it to connect to the MariaDB database you created in the previous step.
In this step, get ready to:
- Install PHP 8.3 with the extensions WordPress requires.
- Download WordPress and deploy it to your server's web directory.
- Configure WordPress to connect to your database.
Install PHP and the required extensions
PHP is the runtime that executes WordPress code. Apache needs a module to pass PHP files to the interpreter, and WordPress needs several extensions for database access, image handling, and internationalization.
- Install PHP 8.3 and all required extensions by running this command:
sudo apt install php libapache2-mod-php php-mysql php-curl php-gd php-mbstring php-xml php-zip php-intl -y
What do these packages do?
- libapache2-mod-php connects Apache to the PHP interpreter so Apache can serve PHP pages.
- php-mysql lets PHP talk to MariaDB and MySQL databases.
- php-curl, php-gd, php-mbstring, php-xml, php-zip, and php-intl handle HTTP requests, image processing, multibyte strings, XML parsing, ZIP archives, and internationalization.
- Verify PHP is installed by running:
php -v
- You should see output starting with PHP 8.3 followed by a version number.
Don't see PHP 8.3?
- Make sure you typed the command exactly as shown. A typo in a package name causes the entire install to fail.
- Run sudo apt update first if you have not updated recently, then try the install command again.
- Why won't PHP install on my Ubuntu server?
Download and deploy WordPress
WordPress distributes its files as a compressed archive. You will download the latest version, extract it, and move it into Apache's web directory.
- Download, extract, and move WordPress into place by running these commands:
cd /tmp
sudo wget https://wordpress.org/latest.tar.gz
sudo tar -xzf latest.tar.gz
sudo mv wordpress /var/www/wordpress
What do these commands do?
- cd /tmp moves to the temporary directory, a safe place for downloads.
- wget downloads the latest WordPress archive from wordpress.org.
- tar -xzf extracts the compressed archive into a folder called wordpress.
- mv moves that folder to /var/www/wordpress, where Apache serves web files from.
- Confirm the WordPress files are in place by running:
ls /var/www/wordpress
- You should see WordPress files and folders including wp-admin, wp-content, wp-includes, and wp-config-sample.php.
Don't see WordPress files?
- If wget failed, check your VM's internet connection by running ping google.com. Press Ctrl+C to stop the ping.
- If ls shows an error, the mv command may have failed. Check whether /tmp/wordpress still exists with ls /tmp/wordpress.
- Why didn't the WordPress download work on my Ubuntu server?
Now you need to create the WordPress configuration file that tells it how to connect to your database.
- Create the WordPress configuration file by running:
cd /var/www/wordpress
sudo cp wp-config-sample.php wp-config.php
- Open the configuration file in the nano text editor by running:
sudo nano wp-config.php
- Find the line that says define( 'DB_NAME', 'database_name_here' ); and replace database_name_here with wordpress_db.
- Find the line that says define( 'DB_USER', 'username_here' ); and replace username_here with wp_user.
- Find the line that says define( 'DB_PASSWORD', 'password_here' ); and replace password_here with the password you created for wp_user in Step 3.
- Save the file by pressing Ctrl+O, then Enter, then exit nano with Ctrl+X.
What is wp-config.php?
This file tells WordPress how to connect to your database. The three values you just set (database name, username, password) must match exactly what you created in MariaDB.
If any value is wrong, WordPress will show a database connection error when you try to load it.
Not sure you edited correctly?
- Re-open the file with sudo nano wp-config.php and scroll to the database section near the top. Verify all three values match what you set in Step 3.
- How do I verify my wp-config.php database settings are correct?
Test WordPress in your browser
Everything is in place. PHP is installed. WordPress files are on the server. The database configuration is set.
- Before you test, predict what you think will happen. You have PHP installed, WordPress files deployed, and your database configured. If you type your VM's IP address followed by /wordpress/ into your Windows browser, do you expect to see the WordPress setup wizard?
- Open a browser on your Windows machine and navigate to http://your-vm-ip/wordpress/ (replace your-vm-ip with the IP address you noted in Step 1).
You will see the Apache2 Ubuntu Default Page instead of WordPress. Apache is still serving content from its default directory and has no idea your WordPress files exist.
Why doesn't WordPress load?
Apache uses a VirtualHost configuration to decide which directory to serve files from. Right now, the only active configuration is the default one pointing to /var/www/html.
Your WordPress files sit in /var/www/wordpress, but Apache has no VirtualHost telling it to serve from there. This is the single most common problem new server admins face. You will fix it in the next step.
Your WordPress files are deployed and configured, but Apache needs to be told where to find them. In the next step, you will create the VirtualHost configuration that points Apache to your WordPress directory and brings your site to life.
Fix the Apache Configuration and Complete the Install
In the last step, you deployed all the WordPress files and hit a wall. Apache returned an error because it has no idea where your WordPress files live or how to serve them.
The fix is a VirtualHost configuration. A VirtualHost tells Apache exactly which directory to serve and how to handle requests to it. This is the single most common problem new server admins face, and solving it is how you learn how Apache actually works.
In this step, get ready to:
- Create an Apache VirtualHost configuration file for WordPress.
- Enable the new site, activate mod_rewrite, and restart Apache.
- Complete the WordPress installation wizard and see the dashboard.
Create the Apache VirtualHost configuration
Right now, Apache is using its default configuration that points to /var/www/html. Your WordPress files live at /var/www/wordpress. You need a VirtualHost file that tells Apache to serve from the correct directory.
- Create a new VirtualHost configuration file by running this command:
sudo nano /etc/apache2/sites-available/wordpress.conf
- This opens the nano text editor with a new empty file. Paste the following configuration into the file:
# WordPress VirtualHost configuration
<VirtualHost *:80>
ServerAdmin webmaster@localhost
DocumentRoot /var/www/wordpress
# Allow WordPress to use .htaccess for permalinks
<Directory /var/www/wordpress>
Options FollowSymLinks
AllowOverride All
Require all granted
</Directory>
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>
What does this configuration do?
- DocumentRoot /var/www/wordpress tells Apache where your WordPress files are.
- AllowOverride All lets WordPress use .htaccess files to control pretty permalinks. Without this, clicking any link on your site returns a 404 error.
- Require all granted allows all visitors to access the site. Without it, Apache blocks every request with a 403 Forbidden.
- Save the file by pressing Ctrl+O, then press Enter to confirm the filename.
- Exit nano by pressing Ctrl+X.
- Confirm the file was saved by running:
ls /etc/apache2/sites-available/wordpress.conf
You should see the file path printed back to you, confirming it exists.
File not found?
- Make sure you included sudo before the nano command. Without it, you do not have permission to write to that directory.
- Check that you pressed Ctrl+O (the letter O, not zero) to save before exiting.
- help me troubleshoot why my wordpress.conf file was not saved
Enable the site and restart Apache
The configuration file exists, but Apache is still using the old default site. You need to enable your new config, disable the default, turn on the rewrite module, and fix file ownership.
- Enable the new site, disable the default, activate mod_rewrite, set file ownership, and restart Apache by running these commands:
sudo a2ensite wordpress.conf
sudo a2dissite 000-default.conf
sudo a2enmod rewrite
sudo chown -R www-data:www-data /var/www/wordpress
sudo systemctl restart apache2
What do these commands do?
- a2ensite wordpress.conf enables your new VirtualHost so Apache uses it.
- a2dissite 000-default.conf disables the old default page that was showing before.
- a2enmod rewrite activates the rewrite module that WordPress needs for clean URLs (permalinks).
- chown -R www-data:www-data gives Apache's user (www-data) ownership of the WordPress files so it can read and write them.
- systemctl restart apache2 applies all the changes by restarting the web server.
- Verify Apache restarted successfully by running:
sudo systemctl status apache2
You should see active (running) in green text. This means Apache is up and serving your new WordPress VirtualHost.
Apache failed to restart?
- Run sudo apache2ctl configtest to check for syntax errors in your configuration file. The output tells you exactly which line has the problem.
- Open the file again with sudo nano /etc/apache2/sites-available/wordpress.conf and compare it character by character against the configuration above.
- help me debug why Apache failed to restart after enabling my WordPress VirtualHost
Complete the WordPress installation wizard
This is the moment of truth. Your VirtualHost is pointing Apache at the WordPress files. The database is ready. PHP is installed. Everything should come together now.
Before you open the browser, predict what you think you will see at http://your-vm-ip/. Will it be another error, or something new?
- On your Windows machine, open a browser and navigate to http:// followed by your VM's IP address (the one you noted in Step 1).
You should see the WordPress installation wizard. The language selection page appears first, followed by the site setup form. The error from Step 4 is gone because Apache now knows where to find your files.
- Select your language and click Continue.
- Enter Greenfield College in the Site Title field.
- Create an admin username and strong password.
- Enter an email address in the Your Email field.
- Click Install WordPress.
After a few seconds, you will see a success screen. Click Log In, enter the credentials you just created, and confirm you see the WordPress dashboard.
What just happened?
WordPress used the database credentials in wp-config.php to connect to MariaDB, created all the tables it needs in wordpress_db, and wrote your site title and admin account into those tables. The WordPress dashboard is now fully operational.
Still seeing an error instead of the wizard?
- Double check that sudo systemctl status apache2 shows active (running). If Apache is not running, the fix in the previous substep did not complete.
- Confirm you are navigating to http://your-vm-ip/ (no /wordpress/ at the end). Your VirtualHost now serves WordPress from the root URL.
- Check that wp-config.php has the correct database name, username, and password from Step 3.
- help me troubleshoot why the WordPress installation wizard is not loading
You just built a complete LAMP stack server from scratch and deployed a working WordPress site on it. Your college website is live on your local network. Ready to take it further? The Secret Mission challenges you to secure the site with HTTPS.
Secret mission
Secure Your Site with HTTPS
Your WordPress site works, but it is served over plain HTTP. Every college website needs HTTPS for security and trust. In this secret mission, you will generate a self-signed SSL certificate with OpenSSL, configure Apache to serve encrypted connections on port 443, and see the padlock icon appear in your browser.
Clean Up Your Resources
Clean Up Your Resources
This project runs entirely on your local Windows machine inside VirtualBox, so there are no ongoing cloud costs.
Decide whether to keep your VM running, pause it to come back later, or delete it entirely to reclaim disk space.
Resources you used:
- VirtualBox VM CollegeWebServer (approximately 20 GB of disk space).
- Ubuntu Server 24.04.4 LTS ISO file (approximately 3.2 GB in your Downloads folder).
Keep everything running
No action needed. Choose this if you plan to continue experimenting with your WordPress server, practicing Linux administration, or using the VM for future projects.
- Your VM will continue to use approximately 20 GB of disk space on your Windows machine.
- You can shut down the VM when not in use by running sudo shutdown now inside the VM terminal.
- Start it again anytime by double-clicking CollegeWebServer in VirtualBox Manager.
Pause - I'll come back to this later
Freeze your VM's current state so you can resume exactly where you left off without keeping it running.
- In VirtualBox Manager, right-click your CollegeWebServer VM.
- Select Close, then select Save State.
- This freezes the VM in its current state, including all running services. To resume later, double-click the VM in VirtualBox Manager.
Delete - I don't want to use this again
Remove all project resources and reclaim your disk space.
- In VirtualBox Manager, right-click the CollegeWebServer VM.
- Select Remove, then click Delete All Files. This removes the VM and its virtual hard disk, reclaiming approximately 20 GB.
- Delete the Ubuntu Server ISO file from your Downloads folder to reclaim an additional 3.2 GB. Open File Explorer, navigate to your Downloads folder, and delete ubuntu-24.04.4-live-server-amd64.iso.
Nice Work!
Nice Work!
You just built a complete college website server from scratch. You can type an IP address into your Windows browser and see a working WordPress site served entirely from your own Linux server.
You've learned how to:
- Build a full LAMP stack from scratch on Ubuntu Server 24.04, installing and configuring Apache, MariaDB, and PHP to work together as a production web server.
- Deploy WordPress 7.0.2 and diagnose why it would not load, then fix the Apache VirtualHost configuration to serve it with working permalinks.
- Create a dedicated database user following least-privilege security principles to protect your site's data.
- Secret Mission: Secure your site with HTTPS using a self-signed SSL certificate and Apache mod_ssl.
Ready to quiz yourself?