Skip to content

Ukwimuka kw'ibibazo vy'ukwakira urubuga, gusubizaho ivyago vya server, no gusubizaho ububiko

Igihe urubuga rwo kwakira urubuga rwacitse intege mu buryo butunguranye, guhagarika konti ataco bimaze, guhagarara kw’ibikoresho vyo mu kigo c’amakuru, canke guhungabanya umutekano wa server, birashobora gutuma umuntu adashobora gushika ku mbuga z’ubudandaji, ku mbuga z’ubudandaji zo kuri interineti, ku mbuga z’abaguzi no ku bubiko bw’ibintu vy’ubuhinga bwa none. Iyo ama server y’ukwakira abashitsi asangiye apfuye, abagenzuzi b’ivy’ubuhinga bwa none bacitse intege, canke amashirahamwe y’ukwakira abashitsi agafunga amakonti mu gihe c’amatati yo gutanga amafaranga canke y’ibikoresho, kugira uburyo butomoye bwo kwimuka mu buryo bwihutirwa birakingira ishirahamwe ryawe gutakaza amakuru ubudasiba no guhagarara igihe kirekire.

Gushitsa ukwimuka kw’ivyihutirwa kw’umukozi mu gihe c’umukazo bisaba uburyo bwo gutoranya. Mu gukuraho ibihugu vy’urutonde rw’amakuru n’amadosiye y’ibikorwa, gutanga umukozi w’igicu yigenga, kugarura imbonerahamwe z’urutonde rw’amakuru n’uburenganzira bwa dosiye, gusubiramwo amakuru ya Domain Name System (DNS) n’ugucererwa guto, no gutanga ivyemezo bishasha vy’umutekano w’urubuga (TLS), ushobora kugarura ibikorwa vy’urubuga vyose mu masaha imwe canke abiri.

Ivyo ubikore ubu

Niba urubuga rwawe canke porogaramu y'urubuga rwawe rwahagaze, rwahagaritswe, canke ruzohagarara vuba, kurikiza izi ntambwe zo guhagarika no gukuraho:

  1. Suzuma uburyo bwo gushika ku butegetsi buca bukora: Gerageza nimba ushobora gushika kuri server yawe biciye kuri SSH (Shell itekanye), SFTP (Itegeko ryo gutanga amadosiye ya SSH), canke urupapuro rwawe rwo kugenzura ukwakira (cPanel, Plesk, DirectAdmin, canke urupapuro rw’igicu rwo gukoresha). Ntushiremwo amatike y’ugushigikira y’ishavu atera ubwoba ko uzohanwa n’amategeko imbere y’uko ukura amakuru yawe, kuko rimwe na rimwe amatike y’urwanko atuma abashitsi batagira umutima mwiza basubiramwo uburenganzira bwo gukoresha amakuru yawe ubwo nyene.
  2. Shoboza "Igihe cose kuri interineti" canke gucungera ububiko ku ruhande rwa CDN yawe: Niba indangarubuga yawe ikoresha proxy y'inyuma nka Cloudflare, winjire mu rubuga rwawe rwa DNS maze usuzume ko ububiko bukora kugira ngo abashitsi babandanye kubona ububiko bw'amapaji mu gihe uriko urasubira kwubaka server y'inyuma.
  3. Gabanya agaciro ka DNS Time To Live (TTL) yawe ku masegonda 60 canke 300 ubwo nyene: Nimba urubuga rwawe rukiriko ruratorera umuti canke rukora igice, winjire mu kwandika urubuga rwawe canke mu gutanga DNS ubu nyene maze ugabanye TTL kuri urubuga rwawe @ (umuzi), www, n'intara A na AAAA amakuru agera ku masegonda 300 (iminota 5) canke amasegonda 60 (umunota 1) rero iyo IP address cutover iriko iraza irakwiragira ningoga kw’isi yose.
  4. Kura mbere urutonde rwawe rw’amakuru rwa SQL: Amadosiye y’urutonde rw’amakuru akenshi ni mato (megabytes gushika kuri gigabytes nkeyi) kandi arimwo amakuru yawe y’inguvu adashobora gusubirizwa (amategeko y’abaguzi, amakonti y’abakoresha, ivyo ushizeko, n’ibikorwa). Kwiruka mysqldump canke pg_dump kuri SSH, canke wohereze hanze .sql.gz ububiko biciye ku phpMyAdmin, hanyuma uyishire kuri mudasobwa yawe yo mu karere ubwo nyene.
  5. Fyonda kandi ushireko amadosiye y'urubuga rwawe n'imiterere y'ikoreshwa: Rema .tar.gz canke .zip ububiko bw'umuzi w'inyandiko yawe (harimwo amadosiye yihishije nka .env na .htaccess) hanyuma ukayikura kuri server biciye ku SFTP canke . rsync.
  6. Suzuma ubugenzuzi bwa konti yawe y’umwanditsi w’indangarubuga: Wemeze ko ushobora kwinjira mu kwandika urubuga aho izina ryawe ry’indangarubuga ryanditswe (nk’Umwanditsi wa Cloudflare, Porkbun, Namecheap, canke AWS Route 53). Niba izina ryawe ry’urubuga ryanditswe biciye muri iyo sosiyete nyene y’urubuga rwo kwakira urubuga rwananiwe, fungura iyo nzira maze ubone EPP / Kode yo kwimurira uruhusha ubwo nyene.

Danger

Igihe utanga .zip canke .tar.gz ububiko bw'ububiko imbere mu bubiko bw'urubuga rwa bose (nk' /var/www/html/backup.zip canke public_html/site-backup.tar.gz), amaboti y’ubugizi bwa nabi yo kuri Internet aguma asuzuma ivyicaro kugira ngo aronke amazina y’amadosiye asanzwe. Iyo uwugutera akuye ububiko bwawe, arashobora gushika ku majambo banga y’ububiko bwawe, imfunguruzo za API be n’amakuru y’abaguzi. Igihe cose wandike ububiko bw'ububiko mu bubiko bwihariye hanze y'umuzi wa rubuga rwa bose (nk' /home/username/ canke /tmp/) maze usibe ububiko bw’igihe gito kuri server igihe nyene ivyo ushobora gukuraho.

Igishushanyo c'ibibazo: guhitamwo inzira yo gukira

Koresha iki giti c'ingingo kugira uhitemwo uburyo bwo gusubirana bwihuta bushingiye ku kuntu ukoresha server yawe n'ukugenzura indangarubuga:

flowchart TD
    A["Urubuga canke Serveri yazimye"] --> B{"Woba ushobora gukoresha SSH, SFTP, canke cPanel?"}
    B -->|"Ego: Ugushika ku buzima birakora"| C["Gukoresha iminota 15 y'ububiko bw'amakuru n'ububiko bwa webroot"]
    B -->|"Oya: Server yapfuye canke konti yafunzwe"| D{"Woba ufise ama backups yo hanze y’aho uri canke console yo gutabara?"}
    D -->|"Uburyo bwo gukiza VPS buraboneka"| E["Gutangura hypervisor Gukiza ISO, gushirako disiki, n'amakuru ya SCP hanze"]
    D -->|"Ivy'inyuma gusa"| F["Kuzana SQL isukuye n'amafoto ya dosiye kuva kuri S3 / Backblaze / ububiko bwo mu karere"]
    C --> G{"Mbega iyo nzira yoba yatewe na malware canke hacking?"}
    E --> G
    F --> G
    G -->|"Oya: Ivyuma, amafaranga, canke ukunanirwa kw'umushitsi"| H["Gutanga VPS isukuye canke gucungera umushitsi no kugarura ububiko butaziguye"]
    G -->|"Ego: Porogaramu y'incungu canke urubuga"| I["Gucungera ububiko, gukoresha CMS/kode nshasha ivuye kuri Git, gusukura ivyo ushizeko na SQL"]
    H --> J["Igerageza biciye ku dosiye y'abashitsi bo mu karere, gutanga icemezo ca TLS, no guca ku nyandiko za DNS A/AAAA"]
    I --> J

Icigwa ca 1: iminota 15 y'amasezerano yo gukura amakuru yihutirwa

Iyo server idashikamye, idashikamye, idashikamye mu gihe c’ugusenyuka kw’ibikoresho, canke ihanganye n’uguhagarikwa vuba, ukure amakuru yawe mu buryo bubereye: amakuru y’imbere, amadosiye y’imiterere ubwa kabiri, kode n’insanganyamatsiko ubwa gatatu, n’ibintu bikomeye bihoraho bishirwako vya nyuma.

Uburyo A: Gukuraho umurongo w'itegeko biciye kuri SSH (vyihuta kandi vyizewe cane)

Abacungera amadosiye bashingiye ku rubuga be n’ivyo bakura kuri mucukumbuzi kenshi bifata umwanya canke bikongera ububiko bw’ibintu igihe bohereje hanze imbuga zirenga megabytes 500. Niba ufise uburenganzira bwo gukoresha SSH, koresha aya mabwirizwa kugira ngo ureme amafoto ahuye, apfutse:

# 1. Create a private working directory outside the public webroot:
mkdir -p ~/emergency_migration && chmod 700 ~/emergency_migration

# 2. Dump MySQL / MariaDB database with single-transaction consistency (no table locking on InnoDB):
mysqldump --single-transaction --routines --triggers --events \
  -u db_username -p db_name | gzip -9 > ~/emergency_migration/db_backup_$(date +%F).sql.gz

# (Alternative for PostgreSQL databases):
# pg_dump -U db_username -Fc db_name > ~/emergency_migration/db_backup_$(date +%F).dump

# 3. Archive the entire webroot, preserving permissions and hidden dotfiles (.env, .htaccess):
tar -czpf ~/emergency_migration/webroot_backup_$(date +%F).tar.gz -C /var/www/html .

# 4. Copy existing Nginx/Apache virtual host configs and cron jobs for reference:
cp -r /etc/nginx/sites-available ~/emergency_migration/nginx_configs 2>/dev/null
crontab -l > ~/emergency_migration/user_crontab.txt 2>/dev/null

Igihe ububiko bumaze kuremwa kuri server iri kure, fungura terminal ku kazi kawe (canke kuri server yawe nshasha) hanyuma ukure amadosiye ukoresheje rsync canke scp:

# Pull the backups to your local computer with resume support (-P) if the connection drops:
rsync -avzP -e "ssh -p 22" username@old_server_ip:~/emergency_migration/ ./local_rescue_folder/

Uburyo B: Gukura amakuru muri VPS idashobora gutangura hakoreshejwe uburyo bwo gukiza

Niba Serveri yawe y’Ibanga (VPS) canke Serveri yihariye inanirwa gufungura (nk’akarorero, kubera kernel ya Linux yononekaye, bootloader ya GRUB yavunitse, canke igice c’umuzi cuzuye) kandi SSH ntivyishure, ntuhanagure canke ngo wongere ushireho ishusho ya serveri:

  1. Injira mu gicu cawe co kugenzura ibikoresho (DigitalOcean, Hetzner, Linode/Akamai, Vultr, OVHcloud, canke AWS EC2).
  2. Gukoresha Uburyo bwo gukiza (canke ushire umuzi ku nkuru y'ugusubirana kw'igihe gito) hanyuma wongere ufungure server mu bidukikije vy'ugukiza vya Linux.
  3. Huza n'ibidukikije vy'ubutabazi biciye ku SSH canke kuri console ya VNC ishingiye ku mucukumbuzi, ushireko ububiko bwa mbere bwa server yawe, hanyuma ukope amadosiye yawe:
# Identify your main storage partition (usually /dev/sda1, /dev/vda1, or /dev/nvme0n1p1):
lsblk

# Mount the partition read-only (or read-write if needed) to /mnt/rescue:
mkdir -p /mnt/rescue
mount -o ro /dev/vda1 /mnt/rescue

# Archive your web files and raw MySQL/MariaDB data directory (/var/lib/mysql):
tar -czpf /tmp/raw_mysql_files.tar.gz -C /mnt/rescue/var/lib/mysql .
tar -czpf /tmp/site_files.tar.gz -C /mnt/rescue/var/www/html .

Uburyo C: Gukuraho urupapuro rwo kugenzura ukwakira abashitsi basangira (cPanel, Plesk, DirectAdmin)

Niba uri ku nzira y'ukwakira abantu ata SSH:

  1. Gukora ububiko bwa cPanel yuzuye: Muri cPanel, fungura Ububiko canke Umufasha w'ububiko hanyuma ukande Ukureho ububiko bwa konti yuzuye. Ivyo bituma haba ikintu kimwe . backup-date_time_username.tar.gz file in your home directory containing your public files, MySQL databases, email forwarders, and DNS zone records, which can be restored with one click on any other cPanel host or unpacked manually on any Linux VPS.
  2. Ivyoherezwa hanze urutonde rw'amakuru rwa phpMyAdmin: Niba igikoresho co gucungera amakuru yuzuye kizimye n'umushitsi wawe, fungura phpMyAdmin, uhitemwo urutonde rwawe rw'amakuru mu ruhande rw'ibubamfu, ukande Gusohora hejuru, uhitemwo Ibisanzwe, shira ahabona imbonerahamwe zose, reba **Ongera DROPUNDE TABLE /CTROSE, gzipped gufatanya, hanyuma ukande Sohora.
  3. File Manager archive: Open File Manager, click Settings in the top right corner and check Show Hidden Files (dotfiles) so you do not miss .htaccess canke .env. Hitamwo amadosiye yose ari imbere public_html/, kanda Fyonda (Zip Archive canke GZiped Tar Archive), ushire ububiko kuri orodinateri yawe, hanyuma ubwo nyene usibe dosiye y’ububiko kuri server.

Icigwa ca 2: Gutanga ibikorwa remezo vyigenga

Never migrate from one failing shared hosting brand to another brand owned by the exact same parent conglomerate using the same datacenter infrastructure. Hitamwo umukozi yigenga w'igicu canke urubuga rucungiwe rufise raporo y'imimerere igaragara n'ubushobozi bwo gufata amafoto.

Kugereranya ubwubatsi bw'ukwimuka vyihutirwa

Ubwoko bw'ubwakiranyi Umuvuduko wo gutanga Ubuhinga bwo mu vy'ubuhinga burakenewe Ikoreshwa ryiza mu gihe c'ivyihutirwa
Ikigereranyo ca VPS c'igicu (Ikiyaga ca digitale, Linode/Akamai, Hetzner, Vultr, Ubwato bw'umuco bwa AWS) Amasegonda 60 Linux yo hagati CLI (SSH, Nginx/Apache, MariyaDB) Igenzura ry’imizi ryuzuye, igiciro gito, ubudahangarwa bwo gusangira uburyo bwo kwakira abashitsi, vyiza ku maporogarama asanzwe canke imbuga za CMS zikoreshwa cane.
**Igicu gicunzwe ** (Igicu, RunIgicu, Forge, Ploi, SpinupWP kuri VPS) Iminota 5 gushika kuri 10 Uwutangura kugeza uwuri hagati Ivyiyumviro vy’ubuhinga bwa LEMP, SSL yubatswemwo, uruhome rw’umuriro, n’ibidukikije vy’ugutegura ata gutegura umukozi w’umurongo w’amabwirizwa.
Umushitsi wigenga cPanel / Plesk Iminota 10 gushika kuri 20 Uwutangura Gusubizaho vyihuta cane iyo ukuyeho yuzuye cpanel-backup.tar.gz ububiko kandi ukeneye kwakira imeyili POP3/IMAP.
**Ukwakira abantu ** (Impapuro z'Igicu, Impapuro za GitHub, Netlify, Vercel) Iminota 2 gushika kuri 5 Hagati (Ibikorwa vya Git) Ni vyiza ku mbuga zidahinduka (Zensical, MkDocs, Hugo, Astro, Next.js) canke gushiramwo urupapuro rw’ivyihutirwa rudahinduka kuri interineti ubwo nyene.

Gutanga Ubuntu busukuye 24.04 LTS LEMP ikirundo (Nginx + MariaDB + PHP)

Niwazunguruka umukozi w'igicu Ubuntu 24.04 LTS, ukoreshe uru rukurikirane rw'amabwirizwa nk'umuzi canke sudo umukoresha yubake urubuga rwiteguye gukora mu minota itanu:

# 1. Update operating system packages and install core utilities:
sudo apt update && sudo apt upgrade -y
sudo apt install -y curl wget git unzip ufw fail2ban

# 2. Configure the Uncomplicated Firewall (UFW) before exposing services:
sudo ufw default deny incoming
sudo ufw default allow outgoing
sudo ufw allow OpenSSH
sudo ufw allow 'Nginx Full'
sudo ufw --force enable

# 3. Install Nginx web server and MariaDB database server:
sudo apt install -y nginx mariadb-server

# 4. Install PHP-FPM and standard web application extensions:
sudo apt install -y php8.3-fpm php8.3-mysql php8.3-curl php8.3-gd \
  php8.3-mbstring php8.3-xml php8.3-zip php8.3-intl php8.3-bcmath \
  php8.3-imagick php8.3-redis

# 5. Enable and start all core services on boot:
sudo systemctl enable --now nginx mariadb php8.3-fpm

Warning

Igihe cose suzuma kabiri PHP, Node.js, Python, canke verisiyo y’urutonde rw’amakuru urubuga rwawe rwa kera rusaba imbere yo guhindura uruja n’uruza. Iyo wimuriye porogaramu ya kera ya PHP 7.4 kuri serveri nshasha ya PHP 8.3 ataco ugerageje, ibikorwa vyacitse mu bikoresho vya kera canke kode y'umuntu ku giti ciwe bishobora gutuma umuntu apfa HTTP 500 Internal Server Error biragwa. Niba bikenewe, ushobora gukoresha verisiyo za kera za PHP iruhande n'uruhande kuri Ubuntu ukoresheje ppa:ondrej/php ububiko gushika kode yawe ivuguruwe.

Icigwa ca 3: Gusubizaho urutonde rw'amakuru, gufungura amadosiye, no gukomeza uruhusha

Igihe server yawe nshasha iriko irakora, ushire ububiko bwawe bw'ububiko kuri server nshasha biciye ku scp canke rsync kandi ugasubizaho urutonde rw'amakuru n'umuzi w'inyandiko.

1. Gukora umukoresha w'urutonde rw'amakuru yitandukanije no kwinjiza SQL dump

Ntukigere uhuza porogaramu y'urubuga n'urutonde rw'amakuru ukoresheje root Konti yanje yaSQL. Rema urutonde rw'amakuru rwihariye n'ukoresha urutonde rw'amakuru rw'uburenganzira bukeyi aboshe cane kuri localhost:

# Open the MariaDB / MySQL administrative shell:
sudo mysql

Imbere mu SQL, genda:

CREATE DATABASE prod_app_db CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
CREATE USER 'prod_app_user'@'localhost' IDENTIFIED BY 'Generate_A_Strong_32_Char_Random_Password';
GRANT ALL PRIVILEGES ON prod_app_db.* TO 'prod_app_user'@'localhost';
FLUSH PRIVILEGES;
EXIT;

Ubu rero n'ushireko .sql.gz backup mu buryo butaziguye mu rutonde rw'amakuru rushasha rwaremwe kuva ku murongo w'amabwirizwa ya Linux:

# Stream and decompress the SQL backup into MariaDB:
zcat ~/db_backup_2026-10-30.sql.gz | sudo mysql -u root prod_app_db

2. Gufungura amadosiye y'ibikorwa no gushinga uburenganzira bukomeye bwa POSIX

Uwufise dosiye idakwiriye canke wemerewe birenze urugero 777 uruhusha ni rwo rutuma habaho ukwimuka kwompi kwavunitse (403 Forbidden canke amashusho yananiwe gushirwako) n'ibindi bihungabanya umutekano:

# Create the target webroot directory and unpack your archive into it:
sudo mkdir -p /var/www/yourdomain.com
sudo tar -xzpf ~/webroot_backup_2026-10-30.tar.gz -C /var/www/yourdomain.com

# Assign ownership to the web server daemon (www-data on Ubuntu/Debian):
sudo chown -R www-data:www-data /var/www/yourdomain.com

# Set all directories to 755 (rwxr-xr-x) and all files to 644 (rw-r--r--):
sudo find /var/www/yourdomain.com -type d -exec chmod 755 {} +
sudo find /var/www/yourdomain.com -type f -exec chmod 644 {} +

# Lock down sensitive configuration files containing database credentials:
sudo chmod 600 /var/www/yourdomain.com/wp-config.php 2>/dev/null
sudo chmod 600 /var/www/yourdomain.com/.env 2>/dev/null

3. Kuvugurura ivyemezo vy'urutonde rw'amakuru n'ibihinduka vy'ibidukikije

Gufungura dosiye y'imiterere y'ikoreshwa ryawe (akarorero, wp-config.php kuri WordPress, .env Ku bwa Laraveli/Urudodo/Django, sites/default/settings.php ku bwa Drupal, canke app/etc/env.php ku Magento) no guhindura:

  • Izina ry'urutonde rw'amakuru (DB_NAME: prod_app_db
  • Ukoresha urutonde rw'amakuru (DB_USER: prod_app_user
  • Ijambobanga ry'ububiko bw'amakuru (DB_PASSWORD): Ijambobanga ryawe rishasha ry'imburakimazi
  • Umushitsi w'urutonde rw'amakuru (DB_HOST: localhost canke 127.0.0.1 (ibuke ko abashitsi benshi bacungiwe bakoresha RDS yo hanze canke amazina y’abashitsi MySQL yo kure; iyo wimukiye kuri VPS yihariye, ivyo bitegerezwa guhindurwa bikagaruka kuri localhost).

Icigwa ca 4: Igerageza ry'amadosiye y'abashitsi bo mu karere imbere yo guhindura DNS ya bose

Ntukigere werekana amakuru yawe ya DNS ya bose kuri serveri nshasha yimukiye imbere yo kugenzura ko urubuga rufunguka, rufatanya n’urutonde rw’amakuru, kandi rutanga neza amahuza yo mu mutima. Ushobora kugerageza server nshasha mu bwiherero kuri mudasobwa yawe bwite mu gihe isi yose iguma ibona ama settings yawe ya kera ya DNS mu guhindura ama settings yawe yo mu karere . hosts dosiye.

  1. Tora aho uba hosts dosiye:
    • Linux na macOS: Gufungura urubuga maze ukoreshe sudo nano /etc/hosts.
    • Idirisha 10 / 11: Gufungura igitabu c'inyandiko nk'umuyobozi hanyuma ufungure C:\Windows\System32\drivers\etc\hosts.
  2. Ongera umurongo w'igihe gito wo guhindura ahantu hasi muri dosiye: Subiriza 203.0.113.50 na aderesi IPv4 ya server yawe nshasha:
    203.0.113.50  yourdomain.com www.yourdomain.com
    
  3. Bika dosiye maze ugerageze mw'idirisha ry'umucukumbuzi w'ibanga: Mudasobwa yawe ubu izoca ku DNS ya bose maze ifungure yourdomain.com uhereye kuri IP ya server nshasha. Gerageza urupapuro rw'intango, amahuza y'ingingo yo mu mutima (niba urupapuro ruto rugaruka 404 Not Found kuri Nginx, menya neza ko server yawe ya Nginx irimwo try_files $uri $uri/ /index.php?$args;), amafishi yo kwinjiramwo abakiriya, n’ugusohora amahera mu igare ry’ibicuruzwa.
  4. Kuraho umurongo uva kuri /etc/hosts igihe igerageza rizoba rishoboye: Ntukibagire gukuraho umurongo w'igihe gito wo guhindura mu karere kawe hosts file before performing the real public DNS cutover.

Phase 5: DNS cutover, TTL bypass strategies, and SSL/TLS certificates

Once local testing confirms the new server works properly, execute the public DNS cutover and provision HTTPS encryption.

Important DNS records to audit during cutover

Record Type Host / Name Target Value Purpose & Migration Action
A Record @ (Root domain) New Server IPv4 (e.g., 203.0.113.50) Routes main IPv4 web traffic to your new server. Update immediately at cutover.
AAAA Record @ (Root domain) New Server IPv6 (e.g., 2001:db8::1) Routes IPv6 traffic. Important: If your new server does not have IPv6 configured, delete the old AAAA record or half your visitors will still hit the dead server.
CNAME / A www yourdomain.com (or New IPv4) Routes www subdomain traffic. Keep synced with the root record.
MX Records @ Mail server hostnames (e.g., Google, Microsoft) Routes inbound company email. Keep intact so corporate email does not break.
TXT (SPF) @ v=spf1 ip4:NEW_IP include:... ~all Authorizes your new server IP to send transactional emails without landing in spam.
CAA Record @ 0 issue "letsencrypt.org" Optional record restricting which Certificate Authority can issue SSL certificates. Verify it allows Let's Encrypt.

How to bypass a stuck 24-hour (86,400-second) DNS TTL cache

If your old web host crashed unexpectedly while your DNS records had a long Time To Live (TTL) of 14,400 seconds (4 hours) or 86,400 seconds (24 hours), simply editing the A record inside the old DNS zone means ISP resolvers worldwide will continue sending visitors to the dead IP address until that timer expires.

  • The Authoritative Nameserver Delegation Trick: If your DNS was hosted on the dead web host's nameservers, log into your domain registrar and change your domain's Authoritative Nameservers (NS) to an independent, high-speed anycast DNS network (such as Cloudflare DNS or AWS Route 53) where you have pre-imported your DNS zone pointing to the new server IP. Top-Level Domain (TLD) registry nameserver updates push instantly to global root servers and often bypass stale child-record caches across major recursive resolvers (such as 1.1.1.1 na 8.8.8.8).
  • Reverse Proxy Traffic Forwarding from the Old Server: If your old server is still accessible via SSH (for example, during a billing migration or hardware deprecation) and you want zero split-brain database writes while DNS propagates over 24 hours, install a lightweight Nginx reverse proxy block or socat tunnel on the old server that proxies 100 percent of incoming HTTP/HTTPS requests transparently over to the new server's IP address. That way, even visitors whose ISP has cached the old IP address are served live from the new server database immediately.

Provisioning free automated SSL/TLS certificates (Certbot / Let's Encrypt)

As soon as your public DNS points to the new server (or via DNS-01 API validation before switching DNS), install a trusted HTTPS certificate so visitors do not encounter browser security warnings:

# Install Certbot and the Nginx configuration plugin:
sudo apt install -y certbot python3-certbot-nginx

# Issue the certificate and configure automatic HTTP-to-HTTPS 301 redirects:
sudo certbot --nginx -d yourdomain.com -d www.yourdomain.com \
  --non-interactive --agree-tos -m admin@yourdomain.com --redirect

# Verify the systemd auto-renewal timer is active:
sudo systemctl status certbot.timer

Note

Let's Encrypt enforces strict production rate limits (up to 5 duplicate certificates per exact set of domains per 7 days, and 50 certificates per registered domain per week). If you are testing your server script repeatedly, always pass the --staging flag to certbot until your setup works, then run certbot once without --staging to fetch your live production certificate.

Phase 6: Protecting corporate email continuity (MX, SPF, DKIM, DMARC)

Kimwe mu bitera ingorane nyinshi z’ukwimuka kw’urubuga vyihuse bishika iyo umuyobozi ahinduye amazina y’urubuga akayigira uwundi muntu mushasha ata kopiye kuri Mail Exchanger (MX) y’urubuga n’ukwemeza TXT amadosiye, mu gacerere akagira ama email yose yinjira mu mashirahamwe.

  1. Sohoka hanze akarere kawe kose ka DNS imbere yo guhindura amazina: Imbere yo guhindura amazina ku registrar yawe, kopira buri kiriho MX, TXT, SRV, na CNAME record from your current DNS dashboard.
  2. Gutandukanya kwakira imeyili n’ukwakira urubuga: Ntukigere wakira imeyili y’ubudandaji ihambaye cane ku rubuga rwa cPanel rumwe n’urubuga rwawe rwa bose. Koresha umukozi w’iposita yihariye (nk’Ikibanza co Gukoreramwo ca Google, Microsoft 365, Ubutumwa bwihuta, Ubutumwa bwa Proton, canke Ubutumwa bwa Zoho) kugira ngo iyo serveri y’urubuga ipfuye ntiyigere ihagarika ivy’itumanaho ry’ishirahamwe.
  3. Vugurura inyandiko yawe ya SPF n’IP nshasha ya server: Niba urubuga rwawe rwohereza ijambobanga ry’iposita, amatangazo y’urupapuro rwo guhamagara, canke amakete y’amategeko ya WooCommerce ataco akora kuri server, subiriza IP ya kera ya server n’IP nshasha ya server iri imbere muri urubuga rwawe v=spf1 TXT yandika, canke urungike imeyili zose zisohoka ku rubuga biciye ku nzira yihariye y’ugucuruza SMTP API (nk’Ikimenyetso c’Iposita, Amazon SES, SendGrid, canke Mailgun) n’ugusinya kwa DKIM gushobojwe.

Icigwa ca 7: Ukwimuka kwari mu gacerere inyuma y'uguhungabana kwa porogaramu mbi canke porogaramu y'incungu

Niba uriko urimura urubuga rwawe kubera ko umushitsi wa kera yahagaritse konti yawe kubera porogarama mbi, inshinge z’ubuhendanyi, kohereza ubutumwa butari bwo, canke ukurenga ku rubuga, ntukope gusa ngo ufungure urubuga rwa kera rwose public_html archive onto your new server. Gukora ivyo bica bikopa urugi rw’inyuma rw’uwo muterabwoba rukaja kuri server yawe nshasha.

Kurikiza iyi nzira yo gukuraho ubuhumane mu cumba:

  1. Gukoresha amadosiye mashasha y’ibikorwa vy’ingenzi avuye mu masoko yemewe: Gukuraho kopi nshasha, itakozweko ya CMS yawe canke y’inzego zawe (nk’akarorero, gukuraho isohoka rya WordPress risukuye rivuye kuri wordpress.org, canke clone commit isukuye yagenzuwe ivuye mu bubiko bwawe bwa Git) maze ushireho kopi nshasha z'ibikoresho vyose n'insanganyamatsiko zivuye mu bubiko buzwi aho gukopa ivya kera . wp-admin, wp-includes, canke vendor amadosiye.
  2. Kopa gusa ibinyamakuru vy'abakoresha bihoraho maze ukureho inyandiko zishobora gukorwa zihishijwe: Abatera bakunda guhisha urubuga rwa PHP rwihishije imbere mu madosiye yo gushiramwo amashusho (nk' wp-content/uploads/2026/05/avatar.jpg.php canke .ico files containing PHP code). Kopa gusa ububiko bwawe bw'amakuru mu bubiko bw'ivy'ibanga maze usukure inyandiko zose zishobora gukorwa imbere yo kuzijana mu muzi wawe w'urubuga:
    # Delete any PHP, Python, Perl, or shell scripts hiding inside the uploads directory:
    sudo find /var/www/yourdomain.com/wp-content/uploads -type f \
      \( -iname "*.php*" -o -iname "*.phtml" -o -iname "*.phar" -o -iname "*.py" -o -iname "*.sh" -o -iname "*.cgi" -o -iname ".htaccess" \) \
      -exec rm -vf {} +
    
  3. Guhagarika ugushirwa mu ngiro kwa PHP imbere muri dosiye y'ivyo ushizeko ku rugero rwa Nginx/Apache: Wongereko ikibanza mu config yawe y'umushitsi wa Nginx ibuza ikintu cose .php dosiye imbere /uploads/ from ever being executed by PHP-FPM:
    location ~* /(?:uploads|files)/.*\.php$ {
        deny all;
    }
    
  4. Suzuma urutonde rw'amakuru rwa SQL ku bakoresha JavaScript n'abakoresha b'abarongozi b'abanyaruyeri: Imbere yo kwinjiza urutonde rw'amakuru yawe, scanner .sql dosiye y'urushinge <script> ibimenyetso, eval(base64_decode(...)) ivy'inyungu, maze usuzume users imeza (wp_users muri WordPress) kugira ngo usibe amakonti yose y’umuyobozi utamenyereye yashizweho n’uwateye. Hindukiza ijambobanga ryose ry'urutonde rw'amakuru, urufunguzo rw'umunyu rw'umutekano wa CMS, n'ikimenyetso ca API ubwo nyene.

Kubaka ukwihangana kw'igihe kirekire: ubuhinga bwo gusubiza inyuma 3-2-1-1-0

Once your website is back online and stable, configure an automated, encrypted off-site backup pipeline so you never face a single point of failure again:

  • Kopi 3 z'amakuru yawe: Server yawe y'ubuhinga bwo gukora ubuzima hamwe n'imiburiburi kopi zibiri zigenga.
  • 2 ububiko butandukanye: Amafoto y'ububiko bwihuta bw'umugenzuzi iruhande y'ibitoro vy'urugero rw'ibikorwa (.sql.gz + . .tar.gz).
  • 1 ahantu h'igicu hanze y'urubuga ku mutangabikorwa atandukanye rwose: Ntukigere ubika amakuru yawe yonyene ku ma server y'ishirahamwe rimwe ry'abakira. Koresha restic canke borgbackup via a daily cron job to push encrypted, deduplicated backups to an independent object storage bucket (such as AWS S3, Backblaze B2, Cloudflare R2, or Wasabi).
  • 1 immutable (append-only / Object Lock) copy: Configure S3 Object Lock or write-only API keys so that even if an attacker gains root SSH access to your web server, they cannot delete or encrypt your historical off-site backups.
  • 0 unverified backups: Gerageza gusubiza ububiko bwawe bw'ububiko mu bidukikije vy'ubuhinga nibura rimwe mu kwezi kugira ngo wemeze ko ububiko bwawe bwa SQL bushitse kandi butagira ubusa.

Ibibazo bikunda kubazwa

How can I migrate my website if my old web host suspended my account and locked me out of cPanel and SSH?

First, check if you have any local backups, developer staging copies, or third-party backup plugin archives stored in Google Drive, Dropbox, or Amazon S3. If your only copy of the site is inside the suspended hosting account, contact the host's Abuse or Billing Compliance department calmly in writing and request a one-time generation of a downloadable backup archive (`cpmove` or `.tar.gz` of your files and SQL database) strictly for off-boarding purposes, offering to settle any undisputed past-due balance if billing was the cause. If the site was mostly informational and the host refuses all access, you can also extract your historical HTML pages, text, and images from the Internet Archive Wayback Machine (`web.archive.org`) using open-source Wayback downloader tools.

Why is my website showing a 500 Internal Server Error or Error Establishing a Database Connection after migrating?

An "Error Establishing a Database Connection" means the database name, username, password, or host address inside your configuration file (`wp-config.php` or `.env`) does not match the user you created in MySQL/MariaDB on the new server, or the `mariadb` service is stopped. A generic `500 Internal Server Error` or blank white screen usually stems from one of three causes: incorrect file ownership (fix with `chown -R www-data:www-data`), a syntax error in `.htaccess`, or a PHP version mismatch where an old plugin crashes on PHP 8.2/8.3. Check the exact error message by running `sudo tail -n 50 /var/log/nginx/error.log` or `/var/log/php8.3-fpm.log`.

Why does my home page work on the new server, but every internal page returns a 404 Not Found error?

When migrating a CMS like WordPress, Laravel, or Drupal from an Apache server (which uses `.htaccess` files for URL rewriting) to an Nginx server (which ignores `.htaccess` files completely), internal permalinks will return `404 Not Found` unless you add a rewrite rule inside your Nginx site configuration block. Open `/etc/nginx/sites-available/yourdomain.com`, locate the `location /` block, make sure it contains `try_files $uri $uri/ /index.php?$args;`, and reload Nginx with `sudo systemctl reload nginx`.

How do I prevent losing new WooCommerce orders or user comments while DNS is propagating to the new server?

To achieve a zero-data-loss migration for dynamic e-commerce or membership sites, place the site into brief "Maintenance Mode" on the old server (blocking new checkout submissions for 10 to 15 minutes) right before taking your final `mysqldump`, import that final SQL dump onto the new server, and then immediately switch your DNS `A`/`AAAA` records (or flip the IP inside your Cloudflare proxy dashboard, which cuts traffic over globally within 30 seconds). You can also configure Nginx on the old server to reverse-proxy requests to the new server IP so visitors with stale DNS caches still interact with the new database.

What should I do if my domain name itself is registered with the failing web hosting company?

Separate your domain registration from your web hosting immediately. However, if your site is currently down, do not start an ICANN Registrar Transfer first, because transferring a domain between registrars takes up to 5 to 7 days and locks your nameservers during the transfer window. Instead, first log into the current registrar panel and change the **Nameservers (NS)** to an independent DNS provider (like Cloudflare or Route 53) to get your website back online today. Once your website is stable on the new server, unlock the domain, get the EPP Auth Code, and transfer the domain registration to an independent registrar.

Why are some visitors seeing my new server while others still see the old broken server hours later?

This is called DNS propagation delay, caused by two factors: the Time To Live (TTL) caching setting that was on your old DNS records before you changed them, and forgotten IPv6 (`AAAA`) records. Many mobile carriers (such as T-Mobile, Verizon, EE, and Telstra) route smartphone traffic preferentially over IPv6. If you updated your IPv4 `A` record to point to the new server, but forgot to update or delete the old IPv6 `AAAA` record, desktop users on Wi-Fi will see your new working site while mobile phone users on 5G will continue hitting the dead server via IPv6.

Amasoko yasuzumwe

  • Ikigo c’Igihugu c’Ivy’Imirongo Ngenderwako n’Ikoranabuhanga (NIST, Leta Zunze Ubumwe za Amerika): Igitabu kidasanzwe 800-34 Rev. 1, Inyobora y’Itegeko ry’Ivyiyumviro vy’Igihugu ku bijanye n’Imirongo y’Amakuru ya Leta Zunze Ubumwe za Amerika n’Ugusubizaho Server (csrc.nist.gov).
  • Ikigo kijejwe umutekano wo kuri interineti n’ibikorwa remezo (CISA, Leta Zunze Ubumwe za Amerika): Ivyigwa vyo kwongerera ubushobozi ku bijanye n’umutekano wo mu gicu, umutekano wa DNS, no gusubiza amakuru y’incungu (cisa.gov).
  • National Cyber Security Centre (NCSC, United Kingdom): Offline and Immutable Backup Guidance, Web Server Security, and Transport Layer Security (TLS) Best Practices (ncsc.gov.uk).
  • Internet Engineering Task Force (IETF, International): RFC 1034 / RFC 1035 (Domain Name System Caching and TTL Specifications) and RFC 8555 (ACME Automated Certificate Management Protocol) (ietf.org).
  • Ishirahamwe ry’Internet ry’Amazina n’Imibare (ICANN, Mpuzamakungu): Itegeko ryerekeye Ukwimurira Ivyanditswe hagati y’Abanditsi n’Uburenganzira bw’Abanditsi (icann.org).
  • Open Web Application Security Project (OWASP, International): Server Hardening, File Upload Sanitization, and Database Security Cheat Sheets (owasp.org).

Inyobora zifitaniye isano