Trusted WordPress tutorials, when you need them most.
Beginner’s Guide to WordPress
Coppa WPB
25 Million+
Websites using our plugins
16+
Years of WordPress experience
3000+
WordPress tutorials
by experts

Come creare un sito WordPress locale utilizzando XAMPP

Il team di WPBeginner crea normalmente siti WordPress locali sui propri computer per testare temi, plugin e funzionalità del sito web senza impattare su un sito live.

XAMPP è un pacchetto software libero e gratuito che fornisce una piattaforma di facile utilizzo per l’impostazione di un’istanza locale di WordPress.

In questo articolo vi mostreremo come creare facilmente un sito WordPress locale utilizzando XAMPP, in modo da poter sperimentare WordPress e affinare le vostre capacità di sviluppo in un ambiente sicuro.

Creating local WordPress install using XAMPP

Perché creare un sito WordPress locale?

La creazione di siti WordPress locali è una pratica comune tra gli sviluppatori e i proprietari di siti. Permette di testare WordPress senza creare un vero e proprio sito web su Internet.

I siti web locali sono visibili solo sul vostro computer. Potete provare diversi temi e plugin di WordPress, testarne le funzionalità e imparare le basi di WordPress.

Se avete già un sito web WordPress, potete creare una copia locale del vostro sito web sul computer per provare i nuovi aggiornamenti dei plugin prima di implementarli sul vostro sito web reale.

Importante: un sito web locale sarà visibile solo sul vostro computer. Se si desidera creare un sito web live, è necessario disporre di un nome di dominio e di un hosting WordPress.

Seguite le istruzioni passo-passo della nostra guida su come avviare un blog WordPress quando siete pronti a creare un sito web dal vivo.

Detto questo, vediamo come installare WordPress in locale su Windows, Mac o Linux utilizzando XAMPP.

Che cos’è XAMPP?

XAMPP è un pacchetto software che include tutto ciò che serve per configurare un ambiente server locale sul proprio computer.

Per creare un sito WordPress locale, è necessario configurare un server web (Apache), PHP e MySQL sul proprio computer.

PHP è un linguaggio di programmazione e MySQL è un software di gestione di database. Entrambi sono necessari per far funzionare WordPress.

Installarli separatamente è piuttosto difficile per i principianti. È qui che entra in gioco XAMPP.

XAMPP semplifica la creazione di siti web WordPress in locale. È disponibile per computer basati su Windows, Mac e Linux.

Iniziamo installando XAMPP e configurandolo per gestire il vostro sito WordPress locale.

Installazione di XAMPP sul computer

Per prima cosa, è necessario visitare il sito web di XAMPP e fare clic sul pulsante “Download” per il proprio sistema operativo.

Download XAMPP to your computer

A seconda del sistema operativo, l’installazione guidata e l’interfaccia dell’applicazione potrebbero differire dalle schermate qui riportate. Per il bene di questo articolo, vi mostreremo la versione Windows del software.

Dopo aver scaricato XAMPP, è necessario fare clic ed eseguire il programma di installazione.

XAMPP set up wizard

XAMPP chiederà dove installare il software e quali pacchetti si desidera installare. Le impostazioni predefinite andranno bene per la maggior parte degli utenti. Continuate a fare clic sul pulsante “Avanti” per terminare l’installazione guidata.

Al termine della procedura guidata, selezionare l’opzione “Avvia il pannello di controllo ora” e quindi fare clic sul pulsante “Fine”.

Finish set up and launch XAMPP control panel

In questo modo si avvia l’applicazione Pannello di controllo XAMPP.

Utilizzando l’applicazione XAMPP, è possibile eseguire il server web Apache come server locale e MySQL come server di database. Cliccate sul pulsante “Avvia” accanto ad Apache e MySQL.

Start Apache and MySQL to launch your local server

XAMPP avvierà ora Apache e MySQL.

È possibile che venga visualizzata una notifica del firewall di Windows. È importante fare clic sul pulsante “Consenti accesso” affinché entrambe le applicazioni possano essere eseguite sul computer.

Allow firewall access to Apache and MySQL

Una volta avviate entrambe le applicazioni, i loro nomi saranno evidenziati in verde.

Ora siete pronti a creare un sito web locale e a installare WordPress utilizzando XAMPP.

Creare un sito WordPress locale con XAMPP

Per prima cosa, è necessario scaricare WordPress. Visitate il sito WordPress.org e fate clic sul pulsante “Scarica WordPress”.

Download WordPress

Dopo aver scaricato WordPress, è necessario estrarre il file zip e si vedrà una cartella wordpress.

È necessario copiare questa cartella.

WordPress folder

Quindi, andare nella cartella di installazione di XAMPP.

Su Windows, sarà C:/Program Files/XAMPP/htdocs o C:/Xampp/htdocs.

Su Mac, sarà /Applications/XAMPP/htdocs.

Incollare la cartella wordpress copiata in precedenza all’interno della cartella ‘htdocs’.

Si consiglia di rinominare la cartella ‘wordpress’ in ‘website’ o altro. Questo vi aiuterà a identificare facilmente il vostro sito locale.

Rename WordPress folder

Successivamente, è necessario aprire il proprio browser web preferito.

È possibile inserire il seguente URL nella barra degli indirizzi del browser:

https://localhost/website1/

Se avete rinominato la cartella WordPress in un altro modo, assicuratevi di sostituire ‘website1’ con il nome della vostra cartella.

Si aprirà la procedura guidata di installazione di WordPress e vi verrà chiesto di selezionare una lingua. Dopo aver selezionato una lingua, fate clic sul pulsante “Continua”.

Select language

Nella schermata successiva, apparirà la schermata di benvenuto di WordPress.

Include un avviso che indica che WordPress ha bisogno del nome del database, del nome utente del database, della password e delle informazioni sull’host.

WordPress installation requirements

Creiamo un database per il vostro sito WordPress.

È necessario aprire una nuova scheda del browser e visitare https://localhost/phpmyadmin/.

In questo modo si avvia l’applicazione phpMyAdmin, preinstallata in XAMPP. Permette di gestire facilmente i database utilizzando un’interfaccia più semplice.

È necessario fare clic su “Database” e indicare un nome per il nuovo database. Quindi, fare clic sul pulsante “Crea” per continuare.

Creating a database for your local WordPress site

Ora che avete creato un database, potete utilizzarlo per il vostro sito WordPress.

Tornate alla scheda del browser /localhost/website1/ e fate clic sul pulsante “Let’s Go”.

Nella schermata successiva, vi verrà chiesto di fornire le informazioni sul database di WordPress.

Inserire il nome del database creato in precedenza. Il nome utente è “root” e il campo della password va lasciato vuoto. Per il campo host del database, è necessario utilizzare localhost.

Enter your WordPress database information

Una volta terminato, fare clic sul pulsante “Invia” per continuare.

Se siete su Windows o Linux, WordPress memorizzerà queste impostazioni nel file di configurazione di WordPress chiamato wp-config.php.

Tuttavia, se siete su un Mac, vi mostrerà il contenuto del file e vi chiederà di crearlo.

È necessario creare questo file nella cartella principale del sito web.

Dopo aver creato il file, incollate al suo interno il testo copiato in precedenza. Successivamente, è necessario salvare il file e tornare al programma di installazione di WordPress per continuare.

Nella fase successiva, WordPress vi chiederà di fornire informazioni sul vostro sito web. Innanzitutto, inserite il titolo che volete utilizzare per questo sito.

Successivamente, è necessario inserire un nome utente, una password e un indirizzo e-mail per l’account amministratore.

Enter your local site information

Una volta compilate tutte le informazioni, fate clic sul pulsante “Installa WordPress” per continuare.

A questo punto WordPress eseguirà l’installazione e chiederà di effettuare il login una volta terminata.

È possibile accedere al proprio sito web andando alla pagina /localhost/website1/wp-admin e utilizzando il nome utente e la password inseriti durante l’installazione.

WordPress login page

Cose da provare dopo la creazione di un sito WordPress locale

Ora che avete creato il vostro sito WordPress locale utilizzando XAMPP, potete lavorare su di esso come fareste con un sito WordPress dal vivo.

Andate al menu Aspetto nella barra laterale di amministrazione di WordPress per personalizzare l’aspetto del vostro sito o installare un nuovo tema.

Ecco alcuni fantastici temi gratuiti che potete provare.

La prossima cosa da fare è installare alcuni plugin di WordPress.

I plugin sono come applicazioni per il vostro sito WordPress e vi permettono di aggiungere funzioni interessanti come un modulo di contatto, pulsanti per i social media, un negozio di e-commerce e molto altro.

Avete bisogno di aiuto per installare i plugin? Consultate la nostra guida passo passo su come installare un plugin di WordPress.

Bonus: Spostare un sito WordPress locale su un server live

Dopo aver lavorato sul vostro sito WordPress locale, potreste volerlo spostare su un server live per creare il vostro primo blog o sito web WordPress.

Per farlo, avrete bisogno di un nome di dominio e di un account di web hosting. Normalmente, un nome di dominio costa 14,99 dollari e l’hosting di un sito web parte da 7,99 dollari al mese.

È troppo se si è agli inizi.

Per fortuna, Bluehost offre agli utenti di WPBeginner un nome di dominio gratuito e un generoso sconto sull’hosting. In pratica, potete iniziare a lavorare per 1,99 dollari al mese.

Per ulteriori consigli sull’hosting, date un’occhiata alla nostra guida completa all’hosting WordPress.

Dopo aver sottoscritto l’hosting, potete seguire la nostra guida passo passo su come spostare WordPress da un server locale a un sito live.

Potreste anche voler dare un’occhiata ai modi alternativi per creare siti WordPress locali su Windows usando Wampserver e su Mac usando MAMP.

Guide di esperti sui siti WordPress locali

Ora che sapete come creare un sito WordPress locale utilizzando XAMPP, potreste voler consultare altre guide relative alle installazioni locali di WordPress.

Speriamo che questo articolo vi abbia aiutato a imparare come creare un sito WordPress locale utilizzando XAMPP. Potreste anche voler consultare la nostra guida sul perché utilizzare WordPress per il vostro sito web o la nostra selezione di esperti per il miglior hosting gratuito di siti web.

Se questo articolo vi è piaciuto, iscrivetevi al nostro canale YouTube per le esercitazioni video su WordPress. Potete trovarci anche su Twitter e Facebook.

Divulgazione: I nostri contenuti sono sostenuti dai lettori. Ciò significa che se cliccate su alcuni dei nostri link, potremmo guadagnare una commissione. Vedi come WPBeginner è finanziato , perché è importante e come puoi sostenerci. Ecco il nostro processo editoriale .

Avatar

Editorial Staff at WPBeginner is a team of WordPress experts led by Syed Balkhi with over 16 years of experience in WordPress, Web Hosting, eCommerce, SEO, and Marketing. Started in 2009, WPBeginner is now the largest free WordPress resource site in the industry and is often referred to as the Wikipedia for WordPress.

Il kit di strumenti WordPress definitivo

Ottenete l'accesso gratuito al nostro kit di strumenti - una raccolta di prodotti e risorse relative a WordPress che ogni professionista dovrebbe avere!

Reader Interactions

178 commentiLascia una risposta

  1. Syed Balkhi says

    Hey WPBeginner readers,
    Did you know you can win exciting prizes by commenting on WPBeginner?
    Every month, our top blog commenters will win HUGE rewards, including premium WordPress plugin licenses and cash prizes.
    You can get more details about the contest from here.
    Start sharing your thoughts below to stand a chance to win!

  2. André Bruwer says

    Hi there WPBEGINNER SUPPORT

    Great article thank you :)

    I was wondering… is it better to develop a wp website for a client live or better to build it locally then transfer it to the hosted wp site with duplicator or something similar?

    Any advise would be greatly appreciated. Can’t figure this one out.

    Thanks
    André

  3. Chaitra says

    Hi, I am getting following error when I connect to localhost/website1
    You don’t have permission to access /website1/ on this server.
    Additionally, a 403 Forbidden error was encountered while trying to use an ErrorDocument to handle the request.

  4. Chaitra says

    Hi, I get the following error when I access localhost/website1 –
    You don’t have permission to access /website1/ on this server.
    Additionally, a 403 Forbidden error was encountered while trying to use an ErrorDocument to handle the request.

    • bala says

      yes there is a way to put your localhost online, you should redirect your domain name to your computer’s ip address

  5. Jojo says

    Hi,
    I followed your tutorial and created a wordpress site. How can I create another local wordpress site with this setup?

  6. paul says

    hi, i have been able to login to wordpress using xampp, but when i click on the themes area i only see three themes. when i try to install a new theme, im notified that there is an error. please i need your help.

  7. Shamrat Hossain says

    This article was really helpful for me . Hope You will be doing good works like this for us in future ..

    Thanks

  8. Abhijith says

    Hi Team

    I have problem with xampp server once installation itz working fine after shutdown if am going to using again in the xamm server buttons not working
    it asking again and again tomcat file….please let me know how to fix it

  9. Suraj Barthwal says

    you’r article was really helpful. i do have a query for you though, what should i do if i wanted to extract my wordpress live website so i could use it in future.

  10. Mario Bergeron says

    Hi,

    Thanks for your article really helpful. Everything works fine, installation etc., but I try to install a theme on my WP and i got this message ”The uploaded file exceeds the upload_max_filesize in php.ini.” What can I do to install my theme??

    Thank you to help me.

    Mario Bergeron

  11. JERSon says

    Hi ALL,

    im stuck at localhost/website1 …it will give the error page

    This site can’t be reached
    localhost refused to connect.
    Search Google for localhost website1
    ERR_CONNECTION_REFUSED

    Please help

  12. Emmanuel says

    Hello WordPress, I have installed and used Xampp yesterday and it worked very fine but whike trying to open and use it today, its taking back to the installation process and asking for a new storage location. How do I go about this?

  13. ayush singh chauhan says

    Sir , when i try opening localhost/website1
    then something else opens which is not similar to yours.
    that is showing index of website ..
    what should i do now

  14. Stanley says

    When I finish with a website and wish to build another different website, how do I go about it? Thanks.

  15. Jonathan Pienaar says

    Great tutorial, and works 99% for Linux. (I had to create wp-config.php manually for some reason).

    Only other issue: trying to use the Elementor Page Builder plugin, but it requires an FTP login/password. Tried starting FTP server, but can’ figure out how to configure it so that I can give Elementor FTP access/download the plugin.

    (Hope this makes sense).

  16. Bhagwat Pawar says

    nice and practically perfect. can i add email functionality here installing gmail smtp or wp smtp plugin

  17. Jane says

    This was so easy to follow. Thank you very much,

    When I want to upload a theme in my new wordpress I get this error: ‘The uploaded file exceeds the upload_max_filesize directive in php.ini.’

    Can I do anything about this?

  18. Kumar says

    Thank you! Wonderfully detailed step-by-step instructions. Was able to install WordPress on my local machine without a problem. Much appreciated.

  19. Julie says

    I am having the same problem James had:
    Hi! I have successfully installed my xamp server, wordpress and database. My question is, after logging in to wordpress, I cannot see any dashboard panel wherein I can edit my themes and install plugins. Please help! Thanks.

    Has anyone found a solution?
    Thanks!

  20. James says

    Hi! I have successfully installed my xamp server, wordpress and database. My question is, after logging in to wordpress, I cannot see any dashboard panel wherein I can edit my themes and install plugins. Please help! Thanks.

  21. Ruma says

    when I am submitting my data base name,username and password it is saying try again i have written each and every thing right name

  22. Dani says

    To anyone having an issue with the localhost/website1 link not working, how I got it to work (on mac, might work for windows) was heading over to the Network tab in XAMPP and pressing enable. Then I took the port number (in my case it was localhost:8080) and then added that to the url. It looked like localhost:8080/website1.

    Good luck!

    • Maria says

      Dani, Thanks so much for your post. I was having the same issue. After reading your post, I was able to get to the next step. few!

  23. Hillary says

    I have set up the WordPress website, but yet i am still having issues upload some plugins that come with the themes i want to use. How do i get to correct this?
    Thanks

  24. Nicholas says

    Thanks you so much ..
    But i have faced one problem, after putting WordPress files into htdocs, i went to my browser and searched for “localhost/WordPress ” and i got ” error 404 Object not found ” how can i please fix that problem?
    Thanks

    • Amokola Stephen says

      Did you start services in your local server(xamp)? if not please navigate xamp control panel and make sure that you start apache and mysql services

  25. Alexander says

    I really like your post, thank you for sharing such a great post. Setting up wordpress website on localhost using XAMPP is the best solution you have. It gives you an option to explore themes and plugins as well. When i was researching how to work on localhost i have found two great resources through which anyone can easily learn to launch wordpress using localhost.
    https://www.wpbeginner.com/wp-tutorials/how-to-create-a-local-wordpress-site-using-xampp/

  26. DavidA says

    Thank you for this article — it is great to be able to work at the website locally before exposing it to the world.

    Is it possible to have more than one website locally? I have another site that I need to modify/see locally. How would I add this to the other without getting them mixed?

    Thank you

  27. Trifina says

    For Mac users you recommended:

    “You will need to create this file in your website’s root folder.”

    Can you elaborate? Where can i find this folder?

  28. Ann says

    followed all the steps but when i put “localhost/website1”, it shows an error saying “Error establishing a database connection”, also tried restarting my xampp, yet still the same problem exist.

  29. Mike says

    Get an Object not found message when I put the localhost/website1 in my browser. It reads the following:

    Error 404

    localhost
    Apache/2.4.25 (Win32) OpenSSL/1.0.2j PHP/5.6.30

    Any ideas guys?

    Thanks

  30. Chris says

    good afternoon,
    thank you for your article. It was easy to follow. I have managed to install WP offline on my pc but I cannot figure out how to login to wp-admin and start working offline.
    I know you mentioned that we should login at /localhost/etc…. but where do I enter that? do I open it on my browser?

    thank you

  31. Amy says

    Hi, thanks for this great tutorial.
    I need to update the php.ini as I am getting the error ‘The uploaded file exceeds the upload_max_filesize directive in php.ini.’ how do I find this on localhost ?
    Thanks!

    • sam says

      Yeah, It happened to me too. You’ve gotta create your database name in the localhost/phpMyAdmin section in your browser before going back to fill the pieces of information and also the username will be root and the password will be empty. You’re good to go

  32. Shaedar says

    Thanks for the detailed guide… i followed the steps as outlined above an it all worked out well until i tried to launch wordpress on my browser by entering “localhost/website1” Instead of launching, its showed “Index/website1”
    please what could be the problem?

  33. Rodney Lacambra says

    Having a local WordPress site is great hence testing functionality, plugins, and themes before making it live.

    It’s also much faster compare to live.

    Thanks, great article.

  34. Paul Guzman says

    This worked to perfection. Can’t believe I actually did this. Instructions were “Right On”. This made my day!

  35. Soham Pratap says

    Much creative way to just design put up the content … experiment and when you are done!! get your site online

Lascia una risposta

Grazie per aver scelto di lasciare un commento. Tenga presente che tutti i commenti sono moderati in base alle nostre politica dei commenti e il suo indirizzo e-mail NON sarà pubblicato. Si prega di NON utilizzare parole chiave nel campo del nome. Avremo una conversazione personale e significativa.