Halloween DealsAmazon USHalloween week deals: useful picks before month-endAmazon US: current deals, useful picks and tech finds.Check DealsSlow PC?RecommendedPC slow today? Run a repair scan before it gets worseResolve common Windows issues and optimize system performance.Scan NowHalloween DealsAmazon USOctober picks are moving - compare before checkoutAmazon US: current deals, useful picks and tech finds.See Picks×
Skip to content
VGSources
Blog

How to Move a Local XAMPP Website to an Ubuntu VPS

Migrate a local XAMPP website safely by exporting its database, copying files, rebuilding Apache/PHP on Ubuntu, testing privately, then switching DNS and HTTPS with rollback protection.
Length14 min Posted Quest giverVGSources Team
Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Move a XAMPP site as a controlled application migration: inventory the local stack, export a logical database dump, copy the application files, recreate Apache/PHP/database services on Ubuntu, test the VPS privately, then change DNS and enable HTTPS. Keep the original project, dump and configuration backups until the public site has remained healthy through your observation period.

What actually moves from XAMPP to the VPS

XAMPP is a development bundle, not a production server image. Your VPS will not inherit XAMPP’s Apache settings, PHP extensions, database accounts, virtual hosts, scheduled jobs or writable directories. Recreate those functions explicitly on Ubuntu and move only the application data and files you need.

As an Amazon Associate I earn from qualifying purchases.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

A typical migration has four independent pieces:

  • Application code: PHP files, templates, JavaScript, CSS and configuration files.
  • Persistent files: user uploads, generated documents, images and other directories that are not rebuilt by deployment.
  • Database contents: a logical SQL export, rather than a raw copy of XAMPP’s database directory.
  • Runtime configuration: PHP version and extensions, Apache virtual-host rules, rewrite support, cron jobs, mail settings, permissions and TLS.

Linux XAMPP installations are normally below /opt/lampp; Windows installations commonly place projects in an htdocs directory. Treat those as clues, not fixed paths. Locate the actual project root and database before copying anything. XAMPP releases for Linux use MariaDB in place of MySQL, so identify the engine and version that produced your dump.

Inventory the local installation before touching the VPS

Write down the items below while the local site still works. This list becomes your acceptance checklist and prevents a seemingly successful page copy from failing later on a missing extension, path or scheduled task.

#1 Best Overall
Sale
Gaoye Blue Light Blocking Glasses
  • BLUE LIGHT BLOCKING GLASSES: Our blue light glasses for women boast UV400 protection, blocking harmful blue rays from computer screens. With these bluelight glasses women, you can enjoy gaming, reading, or watching TV with no worries of eye strain.
  • EYE RELIEF: Our blue light glasses are engineered to reduce blurry vision or strain caused by prolonged screen time. These womens blue light glasses aid in better sleep by preventing blue light from disrupting your natural sleep cycle, helping you fall asleep faster and enjoy a more restful night's sleep, making them the perfect christmas present.
  • COMFORTABLE: Crafted from durable material, our trendy blue light glasses for woman or blue light glasses men ensure long-lasting comfort. The high-transmittance lenses accessories, gamer gifts for men, help keep your eyes relaxed. Perfect stocking stuffers, gifts for gamers men, christmas gifts for men, halloween costumes.
  • LIGHTWEIGHT: These clear blue light glasses feature a lightweight frame, meaning they’ll stay comfy for long-term wear. Perfect as blue blockers glasses for women or mens blue light glasses, these non-prescription fake glasses for men can be worn throughout the day. The blue light blocking glasses women feature polycarbonate HD lenses, which are anti-reflective and restore true color.
  • WORRY-FREE PURCHASE: If you experience any issues, our support team is ready to assist you quickly. These are the perfect costume glasses for cosplay dressing up.
Item What to record Why it matters on Ubuntu
Operating system and XAMPP release XAMPP version, Windows or Linux, and whether the bundle uses MariaDB Different bundles ship different PHP, Apache and database versions.
PHP runtime php -v, loaded modules from php -m, and the web SAPI version shown by a temporary diagnostic page Ubuntu’s PHP must be compatible with the application and its extensions.
Project root Exact path, entry file, public subdirectory and any files outside the document root Apache’s DocumentRoot must point at the correct directory.
Apache behavior Rewrite rules, aliases, custom ports, headers and SSL settings Pretty URLs often depend on .htaccess or a virtual-host rule.
Database Engine, version, database name, tables, users, character set, routines, triggers and approximate dump size These determine the export command, import time and credentials to create.
Persistent files Upload, cache, storage and generated-file directories, including their required write access Code can be read-only while only selected directories are writable.
External integrations Mail provider, payment or API credentials, callback URLs and webhooks Local hostnames and test keys must not remain in production.
Automation Cron entries, Windows Task Scheduler jobs, queue workers and maintenance scripts Ubuntu needs equivalent jobs and a service account.

Freeze changes and create rollback copies

If the local site accepts changing data, enable maintenance mode or stop writes while exporting. A dump made during active writes can be internally inconsistent unless the database engine and command provide a suitable consistent snapshot.

  1. Copy the complete project, including uploads and hidden files, to storage separate from the working directory.
  2. Export a logical SQL dump. Keep the original dump untouched and make a separate copy for testing.
  3. Save the current application configuration, Apache rules and a list of local credentials. Remove secrets from any copy that will be shared.
  4. Record the local database name, user and character set, and calculate a checksum for the dump if you have a verification process.

Apache Friends documents a XAMPP backup command but labels that feature as still under development. A portable logical dump is easier to inspect and restore on an Ubuntu server packaged independently from XAMPP. Do not copy a live local database directory into the VPS’s differently packaged MySQL or MariaDB data directory; internal files, permissions and versions may differ.

Free tools Windows power users keep installed

One-click scans. No signup required.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Provision a secure Ubuntu LTS VPS

Select a supported Ubuntu LTS image from your provider. There is no universal CPU, memory or storage size for this migration: requirements depend on traffic, PHP workload, database size, upload volume and provider limits. Confirm that the plan includes the storage and bandwidth your site needs, an IPv4 address if your DNS or clients require one, snapshots or backups, SSH access and a usable firewall.

Use the provider’s console for the first login, then create a named administrative account and authenticate with an SSH key:

ssh root@VPS_IP
adduser deploy
usermod -aG sudo deploy
mkdir -p /home/deploy/.ssh
chmod 700 /home/deploy/.ssh

Install your public key using the provider’s key facility or ssh-copy-id, test a new session as deploy, and only then consider disabling direct root login. Adapt package commands to the selected Ubuntu LTS release rather than assuming a particular point version.

sudo apt update
sudo apt full-upgrade

Allow only the services you need. A common baseline is SSH, HTTP and HTTPS; restrict SSH by source address when your work pattern permits it. For Ubuntu’s uncomplicated firewall, the equivalent commands are:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
sudo ufw allow OpenSSH
sudo ufw allow 80/tcp
sudo ufw allow 443/tcp
sudo ufw enable
sudo ufw status verbose

Also check any firewall supplied by the VPS provider. Opening a port in one layer does not override a deny rule in the other.

Recreate PHP, Apache and the database runtime

First compare the PHP version and enabled extensions recorded locally with packages available in your Ubuntu release. Do not assume that a newer or older PHP version will run the application unchanged; test compatibility before DNS cutover. Install Apache, the distribution PHP packages and every extension the application actually uses. A representative package set is:

Rank #2
Windex Gaming Cleaning Wipes, Pre-Moistened Wipes to Instantly Clean all Gaming Gear and Electronics, Resealable Packaging for a Freshness Lock, 25 count (Pack of 1)
  • WINDEX GAMING WIPES: effortlessly clean all your gaming gear and gaming electronics in one easy step with our new Windex Gaming Wipes
  • AMMONIA FREE: our ammonia-free formula is safe to use on all of your favorite gaming equipment like consoles, headsets, controllers, screens, keyboards, and more
  • PRE-MOISTENED WIPES: each wipe instantly removes dust, dirt, and stubborn smudges and fingerprints leaving a streak-free shine
  • ANTI-STATIC: great for cleaning and wiping down your gaming gear and electronics leaving behind no visible residue
  • COMPACT RESEALABLE PACKAGE: store your pack of Windex Gaming Wipes anywhere in your home for whenever a quick and easy wipedown is needed
sudo apt install apache2 php libapache2-mod-php php-cli php-mysql php-curl php-mbstring php-xml php-zip php-gd

Add or remove modules according to your inventory. If the application requires a particular PHP branch, use the provider or Ubuntu-supported package source appropriate to that LTS release and document the choice. Verify the web and command-line runtimes:

php -v
php -m
sudo systemctl status apache2

Install MySQL or a MariaDB-compatible server supported by the application. Keep the database engine’s major-version differences in mind when importing SQL produced by XAMPP’s MariaDB. Check service status and enable it at boot:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
sudo systemctl enable --now mysql
sudo systemctl status mysql

Review PHP limits before transferring large uploads. Settings such as upload_max_filesize, post_max_size, execution time and memory limit are read from the SAPI-specific configuration, often under /etc/php/<version>/apache2/php.ini. If you use PHP-FPM instead of Apache’s module, edit the FPM configuration and pool settings instead, then restart the relevant service. Match the limits to the application rather than copying an unnecessarily permissive local configuration.

Copy code and persistent files with controlled permissions

Create the destination outside the default site’s document root, for example /var/www/example, and decide whether the whole project or only a public subdirectory should be exposed. Keep environment files, deployment keys, local caches and development tooling out of the web-accessible tree.

rsync over SSH preserves timestamps and can resume an interrupted transfer. Run it from the machine that contains the working project:

rsync -az --info=progress2 --exclude='.git' --exclude='cache/' --exclude='.env.local' /path/to/project/ deploy@VPS_IP:/var/www/example/

Use an absolute source path and the trailing slash deliberately: it copies the contents of project into the destination. Review every exclusion so that you do not omit required uploads or configuration. On Windows, use an authenticated SFTP or rsync-capable client if a native rsync environment is not available.

What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Set ownership so you can deploy without making all files writable by Apache. The exact account model is a policy decision, but a common pattern is:

sudo chown -R deploy:www-data /var/www/example
sudo find /var/www/example -type d -exec chmod 750 {} ;
sudo find /var/www/example -type f -exec chmod 640 {} ;

Grant group write access only to directories the application must change, such as an uploads or cache directory. Never make the entire project world-writable to solve a permissions error. Confirm that Apache can read the entry script and that the selected writable directories are on the same filesystem path your application expects. Linux paths are case-sensitive, so a reference to Images/logo.png will not match images/logo.png.

Rank #3
Sale
LISEN Cell Phone Stand Phone Holder for Desk, Office Decor Gadgets for Men
  • Ergonomic & Adjustable Design: Fight "text neck" and improve your posture. Designed for comfort, it offers an adjustable height (7.1in-8.5in) (1.4in adjustable range) and angle (5°-85°) Please note: cell phone stand is only 9 inches tall—the length of a standard pencil
  • Without blocking subtitles Perfect for office desk Tiktok Face Time Zoom video—this is the ultimate kitchen desk essential for phones! Perfect viewing experience while reducing neck back strain, A must-have for gamers streamers desk, and anyone who values both style and support!
  • Sleek & Stable Design fits Otterbox Case: Say goodbye to bent cables, tangles, and tip-overs! LISEN’s stylish adjustable desk phone holder features a built-in charging hole and smart cable management, keeping your phone secure and your workspace clutter-free cool gadgets for men
  • ANTI-SLIP DESIGN free hands: The under 10.00 items easy gadgets back and the bottom of this kitchen essentials for women are fully covered by anti-skid silicone, which LISEN stand up desk decor can provide maximum protection device from any scratches and slides
  • Your Perfect Viewing Companion:If your product arrives damaged or breaks within 365 days, reach out to LISEN for a quick and hassle-free solution. Struggling with assembly, like tightening the screw? We’ve got your back! Your experience matters to us. (Product including: phone Holder stand*1, screw*1, hexagon screwdriver*1, specification*1)

Configure an Apache virtual host

Apache2 treats sites as separate configuration files. Create a file such as /etc/apache2/sites-available/example.conf and replace the sample hostname and path with your real values:

<VirtualHost *:80>
    ServerName example.com
    ServerAlias www.example.com
    DocumentRoot /var/www/example/public

    <Directory /var/www/example/public>
        Options FollowSymLinks
        AllowOverride All
        Require all granted
    </Directory>

    ErrorLog ${APACHE_LOG_DIR}/example-error.log
    CustomLog ${APACHE_LOG_DIR}/example-access.log combined
</VirtualHost>

Use DocumentRoot /var/www/example instead if the application has no separate public directory. AllowOverride All permits a supported application to use its .htaccess rewrite rules; if you prefer to keep overrides disabled, translate those rules into the virtual-host configuration instead.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Enable the required module and site, validate the syntax, then reload Apache:

sudo a2enmod rewrite
sudo a2ensite example.conf
sudo a2dissite 000-default.conf
sudo apache2ctl configtest
sudo systemctl reload apache2

Disabling the default site is appropriate when this VPS is dedicated to the migrated domain. If several domains share the server, keep a deliberate default and create a virtual host for each domain. Confirm that the log paths are writable by the service and that the hostname appears in the correct virtual host before exposing the site publicly.

Export the XAMPP database and restore it on Ubuntu

Use the database’s logical tools rather than copying its data directory. You can export through XAMPP’s database client or with mysqldump. For a database named appdb, a typical export is:

mysqldump -u root -p --single-transaction --routines --triggers appdb > appdb.sql

--single-transaction is useful for transactional tables because it avoids a long write lock while producing a consistent snapshot. It does not make non-transactional tables consistent during concurrent writes, so maintenance mode remains the safest option. Include routines and triggers when the application uses them. For a very large production database with strict downtime requirements, compare logical dumping with a physical-backup tool such as Percona XtraBackup; physical methods have different version, storage and restore requirements and should be tested before they become your only recovery path.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Transfer the dump separately and protect it because it contains application data:

scp appdb.sql deploy@VPS_IP:/home/deploy/
sha256sum appdb.sql

Create a dedicated database and user on Ubuntu rather than using the database superuser from application code:

Rank #4
Ledagic IC+RGBW USB Powered Led Light Bar with App & Remote Control, 2 Pack
  • Easy Installation: Our gaming lights have been designed to enhance your entertainment experience. Simply position the led light bar next to your TV or game console to create a game room environment with ease. They come with USB power and a 60 inch cord for direct mounting and mobility
  • Audio Syncing & Extensive Mode: The built-in high-sensitivity music sensor allows you to sync the TV led lights to your favorite music. Lights react and move to the beat of music, film and game audio, creating an incredible immersive sound and light experience – and all without the need for an additional hub. You can choose from 64+ patterns, including strobe, illusion, jump, energy, gradient, running, chasing, fluttering mode etc. Each mode can be applied to different scenes
  • 64+ Chasing IC+RGB & W Effect: The independent control design of IC+RGB and white all-in-one multifunctional rgbw led bar lights monitor backlight allows you to easily switch the led lights for desk between IC+RGB and white to enjoy a variety of lighting effects, you can choose white lighting mode with high brightness for better illumination when working, etc. Choose IC+RGB lighting mode when you need to create an entertaining atmosphere for the light show, 16 million colours of Color changing rgb light bar let you dance to the beat and create a dynamic party atmosphere
  • Dynamic and Dimmable Lights: 1%-full brightness free brightness adjustment gives you the flexibility to adjust dimmable led light bar for room decorations or a variety of occasions
  • USB Powered: USB light bars for room can be powered by powernank, usb charger, TV, Monitor, laptop PC mainframe, making behind TV led lighting bar easy to install in any location.TV led lights are powered by the TV usb interface / PC mainframe, can be turned on/off synchronously with TV / PC
sudo mysql
CREATE DATABASE appdb CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
CREATE USER 'appuser'@'localhost' IDENTIFIED BY 'use-a-long-unique-password';
GRANT ALL PRIVILEGES ON appdb.* TO 'appuser'@'localhost';
FLUSH PRIVILEGES;
EXIT;

Choose the character set and collation that match your application. Then import the dump with the application account or an administrative account according to the dump’s contents:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
mysql -u appuser -p appdb < /home/deploy/appdb.sql

Check the result by listing tables, counting a few known records and testing a write through the application. Ubuntu documentation presents mysqldump [database name] > dump.sql and restoration with mysql -u root [database name] < dump.sql; substitute your actual names and handle passwords securely rather than placing them in shell history.

Update application configuration for production

Replace every setting tied to the local machine. Depending on the framework, these may live in an environment file, a PHP configuration file or a control-panel setting:

  • Database host, database name, username and password.
  • Base URL and trusted host names, including the HTTPS form of the domain.
  • Absolute filesystem paths for uploads, cache and generated files.
  • Mail transport, sender address and credentials.
  • API endpoints, webhook URLs and production keys.
  • Session, cookie and cache settings.
  • Queue workers, cron commands and time zone.

Do not leave localhost, a XAMPP drive letter, a Windows backslash path or a development database account in the production configuration. Linux and many PHP frameworks distinguish path case. If the application builds URLs from a configured base URL, set it before testing redirects and form actions. Keep secrets readable only by the deployment or service account that needs them, and never commit them to a public repository.

Test privately before changing DNS

Test the VPS while the public domain still points elsewhere. You can use the server’s IP address for a simple check, or add a temporary entry to your workstation’s hosts file that maps the real hostname to the VPS IP. A command-line alternative is:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
curl -i -H 'Host: example.com' http://VPS_IP/

Run a complete acceptance pass:

  • Open the home page and several deep links; confirm that rewrite rules do not return 404 errors.
  • Log in, log out, reset a password and verify session cookies.
  • Read and write representative database records, including special characters and dates.
  • Submit every important form and verify validation, redirects and error handling.
  • Upload, resize, download and delete files; confirm that only intended directories are writable.
  • Check image, CSS, JavaScript and font URLs for incorrect hostnames or case mismatches.
  • Send a real or safely isolated test email and inspect the mail service’s response.
  • Run each cron job or queue worker manually once, then install its scheduled Ubuntu equivalent.
  • Confirm PHP upload limits, memory limits and execution time with a realistic payload.

When a request fails, check the service before changing code:

sudo systemctl status apache2
sudo systemctl status mysql
sudo journalctl -u mysql --since '30 minutes ago'
sudo tail -n 100 /var/log/apache2/example-error.log
sudo tail -n 100 /var/log/apache2/example-access.log

Ubuntu identifies service status and journalctl -u mysql as useful troubleshooting starting points. Apache’s error log usually distinguishes a PHP fatal error, a permission denial, a missing rewrite module and a database connection failure.

Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Change DNS and enable HTTPS only after acceptance passes

Lower the domain’s DNS TTL before the planned cutover when practical, allowing the previous value to expire. At cutover, change the relevant A or AAAA record to the VPS address and account for any proxy or CDN records. DNS propagation is cache-dependent, so keep the old site available during the overlap.

Best Value
Sale
HUANUO FlowLift™ Dual Monitor Stand, Fully Adjustable Gaming Monitor Desk Mount for 13–32″ Computer Screens, Full Motion VESA 75x75/100x100 with C-Clamp & Grommet Base, Each Arm Holds 4.4 to 19.8 lbs
  • Compatible with Wide Screens - To ensure compatibility with the dual monitor mount, your each monitor must meet three conditions at the same time: First, computer screens size range: 13 to 32 inches. Second, screen weight range: 4.4 to 19.8 lbs. Third, the back of the monitor screen must have VESA mounting holes with a pitch of 75x75mm or 100x100mm.
  • Regarding the compatibility with desks - Your desk must meet three conditions at the same time: First, desk material: Only wooden desks are recommended, plastic or glass desks cannot be used. Second, desk thickness range: 0.59" - 3.54". Third, the bottom of the desk should not have any cross beams or panels, as this will interfere with installation. We recommend carefully checking that your desk and monitors meets all above conditions before purchasing.
  • Dual C-Clamp Hold - Worried your dual monitors might wobble or slip? Our upgraded base uses a larger platform plus a dual C-clamp structure to lock the dual monitor arm firmly to your desk. Each arm safely keeps your screens steady while you type, click and game—no shaking, no sliding, just a clean and secure setup you can trust every day. It also provides Grommet Mounting installation choice, both options ensure stable and secure fixation for your 0.59" - 3.54" desk.
  • Full-Motion Adjustment For Comfortable View - Pull the screen closer when you’re deep in a spreadsheet, push it back to watch videos, or rotate to portrait for coding — moving everything smoothly with just one hand. The monitor stand offers +85°/-50° tilt, ±90° swivel and 360° rotation. Raise your monitor up to 15.75″ to support a healthy sitting posture. Whether you’re working from home, gaming through the night, or switching between video calls and documents, getting the screens to your natural line of sight helps relieve neck, shoulder and back strain so you can stay focused longer with less fatigue.
  • Keep Your Desk Organized: By lifting both screens off the desktop, this dual monitor stand opens up valuable space for your keyboard, notebook, docking station or a simple, clutter-free work area. Built-in cable management guides wires along the arms, keeping cords out of sight and out of the way. Enjoy a tidy, modern workstation that looks as good as it feels to use.

Issue or re-issue a TLS certificate for the real domain using an ACME client or certificate service supported by your Ubuntu release and provider. Complete validation only after DNS resolves to the VPS, then configure HTTPS in Apache. Verify:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
  • HTTP requests redirect once to the canonical HTTPS URL.
  • The certificate covers the apex and any required www name.
  • Application-generated links, cookies and redirects use HTTPS.
  • Mixed-content warnings do not appear for scripts, styles or images.
  • Automatic certificate renewal is scheduled and has a documented test procedure.

Keep port 80 open if it is needed for certificate validation or HTTP-to-HTTPS redirects; do not expose database ports to the public internet unless a specific architecture requires it.

Keep a rollback plan after launch

DNS changes are reversible, but a rollback is only useful if the old copy and its data remain intact. Keep the original local project, the verified SQL dump, configuration backups and the previous DNS values. Define the observation window in advance; it should cover normal traffic, scheduled jobs and at least one backup cycle.

If errors appear after cutover, capture logs and determine whether the fault is code, data, DNS, TLS or capacity. For a data-writing application, avoid directing users back to two independent databases without a synchronization plan. If necessary, place the site in maintenance mode, restore DNS to the previous endpoint, preserve the new database for diagnosis and document any writes made during the interval.

How to choose the VPS and backup approach

Infrastructure choices affect the migration even when the application code stays unchanged. Compare providers on the following practical criteria:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Criterion Questions to answer
Ubuntu support Is the required Ubuntu LTS image available, and can you reinstall or upgrade it?
Snapshots and backups Are automated off-site backups available, how long are they retained, and can you restore to a separate instance?
Region and latency Is a region close to your audience available, and are IPv4 and IPv6 addresses provided?
Network and storage limits What bandwidth, disk type, IOPS and backup-storage limits apply, and what happens when they are exceeded?
Firewall and access Can you restrict ports, use SSH keys and recover access through an out-of-band console?
Support and total cost What are the recurring compute, storage, snapshot, transfer and IP charges, and what support response is included?

Choose the database transfer method according to size and downtime tolerance:

Method Best fit Trade-offs
mysqldump logical export Small and medium sites, portable migrations and restore tests Produces a SQL file and can take longer for very large databases.
MySQL Shell dump utilities Projects that need parallel logical export and import features Requires compatible tooling and a tested restore workflow.
Physical backup such as Percona XtraBackup Large production databases where restore speed and low downtime justify operational complexity More sensitive to engine versions, storage layout and permissions; portability is lower.

Whatever method you select, perform a restore on the target class of server before declaring the backup usable.

Common failures and precise fixes

Symptom Likely cause Fix
Apache shows the default Ubuntu page The default site is still selected or the hostname does not match Check a2ensite, the ServerName, DNS or hosts-file mapping, then run apache2ctl configtest.
All pretty URLs return 404 Rewrite module or overrides are disabled Enable rewrite, verify AllowOverride and confirm that the application expects the selected document root.
Uploads fail or large forms are rejected PHP or web-server size and timeout limits are too low Adjust the correct SAPI configuration, restart the service and retest with a known payload.
PHP source code downloads or appears as text PHP handler is missing or Apache is serving the wrong directory Install and enable the PHP integration, inspect the virtual host and reload Apache.
Database connection is refused Wrong host, credentials, socket, service state or firewall rule Check systemctl status mysql, test the credentials locally on the VPS and compare the application’s host setting with the database bind configuration.
Tables or accented text are corrupted Character-set or collation mismatch during export/import Inspect the dump and database defaults, then import into a database configured for the application’s required encoding.
Images work locally but not on Ubuntu Case-sensitive path mismatch or missing upload directory Compare URL and filename case exactly and transfer the persistent directory separately.
Permission denied errors appear in logs Apache cannot read code or write the required directory Correct owner and group, grant write access only to the necessary path and avoid recursive world-writable permissions.
Mail works locally but not in production Local mail catcher, blocked outbound port or missing production credentials Configure a real mail transport, test delivery and inspect both application and provider logs.
HTTPS redirects loop The application does not trust the proxy’s HTTPS header or its base URL is wrong Align proxy, Apache and application HTTPS settings, then test one canonical redirect path.

Final cutover checklist

  • Local project and uploads are archived; the SQL dump has been restored successfully.
  • Ubuntu is patched, SSH keys work for a non-root administrator and only required firewall ports are open.
  • PHP version, extensions, limits and database engine are compatible with the application.
  • Files are in the intended document root with least-privilege ownership and writable directories.
  • Apache virtual host, hostname, rewrite behavior and logs are correct.
  • Database credentials are dedicated to the application and no local secrets remain exposed.
  • Private tests cover authentication, writes, uploads, mail, cron, URLs and error handling.
  • DNS records, TTL, certificate coverage, redirects and renewal have been checked.
  • Rollback copies, previous DNS values and an observation window are documented.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

Leave a Reply

Your email address will not be published. Required fields are marked *

What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

More quests from Patch Notes

  1. How to Set Up a RedM (RDR2) Server in 2026: License Key, txAdmin and server.cfg, Step by StepBlog11min
  2. Best RedM (RDR2) Server Hosting in 2026: Comparing Four Hosts on Slots, Memory and PriceBlog10min
  3. How to Host a Mindustry Server in 2026: server-release.jar, Port 6567 and the Commands That MatterBlog7min
Recommended PC Tool
Recommended PC Tool
Outdated Drivers Are Slowing You DownFree scan - exact matches
PC Slower Than It Used to Be?Free scan - under a minute

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.