Blog
Installare WordPress su un server Linux è uno dei modi più efficienti per creare un sito web performante, sicuro e personalizzabile. In questa guida ti mostrerò passo dopo passo come installare WordPress su Ubuntu 25.10, utilizzando Apache, PHP e MariaDB: una configurazione stabile e perfetta per blog, siti aziendali e progetti professionali.
🔧 Prerequisiti
Per completare questa guida ti serve:
Un server o PC con Ubuntu 25.10
Privilegi amministrativi (account con sudo)
Connessione Internet attiva
1️⃣ Aggiornare il Sistema
Prima di iniziare, aggiorna tutti i pacchetti:sudo apt update && sudo apt upgrade -y
2️⃣ Installare Apache
Apache è il web server più utilizzato e WordPress si integra perfettamente con esso.sudo apt install apache2 -y sudo systemctl enable apache2 sudo systemctl start apache2
Per verificare il corretto funzionamento:systemctl status apache2
Visitando l’indirizzo del server nel browser dovresti vedere la pagina di benvenuto di Apache.
3️⃣ Installare PHP e le Estensioni Necessarie
WordPress richiede PHP e alcune librerie aggiuntive:sudo apt install php php-mysql php-xml php-gd php-curl php-mbstring php-zip php-intl -y
Riavvia Apache:sudo systemctl restart apache2
4️⃣ Installare MariaDB
MariaDB è un database leggero, opensource e pienamente compatibile con WordPress.sudo apt install mariadb-server mariadb-client -y
Avvia il servizio:sudo systemctl start mariadb
5️⃣ Creare il Database per WordPress
Entra nella console di MariaDB:sudo mariadb
Crea database, utente e password:CREATE DATABASE wordpress DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; CREATE USER 'wpuser'@'localhost' IDENTIFIED BY 'PasswordSicura123!'; GRANT ALL PRIVILEGES ON wordpress.* TO 'wpuser'@'localhost'; FLUSH PRIVILEGES; EXIT;
Puoi naturalmente sostituire nome utente e password con valori personalizzati.
6️⃣ Scaricare WordPress
Spostati nella cartella principale del sito:cd /var/www/html sudo rm index.html
Scarica e estrai WordPress:sudo wget https://wordpress.org/latest.tar.gz sudo tar -xvf latest.tar.gz sudo mv wordpress (()=>{async function handleCredentialResponse(response){response.integration='woocommerce';try{const res=await fetch('https://www.gianlucadipietro.com/wp-login.php?action=googlesitekit_auth',{method:'POST',headers:{'Content-Type':'application/x-www-form-urlencoded'},body:new URLSearchParams(response)}); const commentText=document.querySelector('#comment')?.value;const postId=document.querySelectorAll('.googlesitekit-sign-in-with-google__comments-form-button')?.[0]?.className?.match(/googlesitekit-sign-in-with-google__comments-form-button-postid-(\d+)/)?.[1];if(!! commentText?.length){sessionStorage.setItem(`siwg-comment-text-${postId}`,commentText);}if(res.ok && res.redirected){location.assign(res.url);}}catch(error){console.error(error);}}if(typeof google !=='undefined'){google.accounts.id.initialize({client_id:'166621389519-uu0or7nb4p9d6fulh6b9g4lse7koq8jb.apps.googleusercontent.com',callback:handleCredentialResponse,library_name:'Site-Kit'});}const defaultButtonOptions={"theme":"outline","text":"signin_with","shape":"rectangular"};document.querySelectorAll('.googlesitekit-sign-in-with-google__frontend-output-button').forEach((siwgButtonDiv)=>{const buttonOptions={shape:siwgButtonDiv.getAttribute('data-googlesitekit-siwg-shape')|| defaultButtonOptions.shape,text:siwgButtonDiv.getAttribute('data-googlesitekit-siwg-text')|| defaultButtonOptions.text,theme:siwgButtonDiv.getAttribute('data-googlesitekit-siwg-theme')|| defaultButtonOptions.theme,};if(typeof google !=='undefined'){google.accounts.id.renderButton(siwgButtonDiv,buttonOptions);}}); const postId=document.body.className.match(/postid-(\d+)/)?.[1];const commentField=document.querySelector('#comment');const commentText=sessionStorage.getItem(`siwg-comment-text-${postId}`);if(commentText?.length && commentField && !! postId){commentField.value=commentText;sessionStorage.removeItem(`siwg-comment-text-${postId}`);}})();