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

Como mover um site WordPress ativo para um servidor local

Deseja um espaço seguro para fazer experiências com seu site WordPress sem medo de quebrar algo em seu site ativo?

Mover seu site WordPress para um servidor local em seu computador é a solução perfeita, em nossa opinião, especialmente para desenvolvedores, designers ou iniciantes em WordPress.

A instalação do WordPress em seu computador (servidor local) permite que você aprenda facilmente sobre o WordPress e faça testes. Ao mover um site WordPress ativo para um servidor local, você pode fazer experiências com os mesmos dados do seu site ativo.

Neste artigo, mostraremos como mover facilmente um site WordPress ativo para um servidor local.

Moving a live WordPress site to a local server on your computer

Por que e quem gostaria de mover um site WordPress ativo para um servidor local?

Se você já tem um site WordPress há algum tempo, talvez queira experimentar novos temas ou um plug-in. No entanto, fazer isso em um site ativo pode resultar em uma experiência de usuário ruim para seus usuários.

Para evitar isso, muitos usuários criam uma cópia do site WordPress em um servidor local para testar novos temas, plugins ou fazer testes de desenvolvimento.

Isso permite que você configure o tema com todo o seu conteúdo e teste todos os recursos sem se preocupar com a quebra do site. Muitos usuários copiam seu site para um servidor local para praticar suas habilidades de WordPress e de codificação com dados reais do site.

Embora você possa fazer todos os testes com conteúdo fictício no WordPress, os dados reais do site oferecem uma representação visual melhor de como essas alterações aparecerão no site ativo.

Preparação para mover um site local para um servidor local

Primeiro, você precisa garantir que sempre faça backup do seu site WordPress. Há vários plug-ins excelentes de backup do WordPress que você pode usar.

Em segundo lugar, você precisa instalar um ambiente de servidor local em seu computador. Você pode usar o WAMP para Windows e o MAMP para Mac. Depois de configurar o ambiente, você precisa criar um novo banco de dados usando o phpMyAdmin.

Basta acessar o seguinte URL em seu navegador para iniciar o phpMyAdmin.

http://localhost/phpmyadmin/
http://localhost:8080/phpmyadmin/

A partir daí, você precisa clicar na guia “Databases” (Bancos de dados) e criar um novo banco de dados. Você precisará desse banco de dados para depois descompactar os dados do site ativo.

Create database

Agora você está pronto para mover seu site WordPress ativo para o servidor local.

Método 1. Como mover um site WordPress ativo para um servidor local usando um plug-in

Esse método é mais fácil e recomendado para todos os usuários.

A primeira coisa que você precisa fazer é instalar e ativar o plug-in Duplicator. Para obter mais detalhes, consulte nosso guia passo a passo sobre como instalar um plug-in do WordPress.

O Duplicator permite que você crie facilmente um pacote duplicado de todo o seu site. Ele pode ser usado para mover seu site WordPress para um novo local e também pode ser usado como um plug-in de backup.

Observação: Há uma versão gratuita do Duplicator com a qual você pode começar. No entanto, o Duplicator Pro vem com backups ilimitados e recursos mais avançados.

Após a ativação, vá para Duplicator Pro ” Backups na barra lateral do administrador do WordPress. Para criar um novo pacote, você precisa clicar no botão “Add New” (Adicionar novo).

Add new backup

Em seguida, o Duplicator iniciará o assistente de backup.

Primeiro, você precisa inserir um nome para o seu pacote de backup. Você também pode usar as tags dinâmicas para criar automaticamente um formato de nome, como a data e o título do site.

Enter name of backup

Em seguida, expanda a seção “Storage” (Armazenamento) e escolha um local de armazenamento.

Para este tutorial, usaremos o local padrão. Você pode clicar no link “Add Storage” para adicionar um novo local, como o Dropbox ou o Google Drive, se desejar.

Choose storage in Duplicator

Clique no botão “Next” para continuar.

O plug-in fará uma varredura em seu site e executará algumas verificações em segundo plano. Em seguida, ele mostrará um resumo dessas verificações.

Se tudo estiver correto, clique no botão“Create Backup” para continuar.

After the scan, create the backup

O Duplicator agora criará seu pacote de site.

Quando terminar, você verá um arquivo zip que contém todos os dados do seu site e um arquivo de instalação. Você precisa fazer o download de ambos os arquivos para o seu computador.

Download website backup files

Agora você está pronto para descompactar e instalar esses arquivos em seu servidor local.

Primeiro, você precisa criar uma nova pasta na pasta raiz do seu servidor local. Essa é a pasta em que seu servidor local armazena todos os sites.

Por exemplo, se você estiver usando o MAMP, será a pasta /Applications/MAMP/htdocs/. Como alternativa, se você estiver usando o WAMP, será a pasta C:\wamp\www\.

Dentro dessa pasta, você pode criar novas pastas para cada novo site que deseja importar ou criar em seu servidor local.

Creating a website folder on your local server

Depois disso, você precisa abrir a pasta criada para o site local e copiar e colar o arquivo zip e o script do instalador que você baixou anteriormente.

Copy and paste Duplicator package and installer files

Para executar a instalação, é necessário abrir o script installer.php em seu navegador da Web.

Por exemplo, se você colou os dois arquivos na pasta /mylocalsite/, poderá acessá-los no navegador visitando http://localhost/mylocalsite/installer.php.

Agora você verá o script de instalação do Duplicator como este:

Duplicator installer screen

Clique no botão “Next” para continuar.

Agora, o Duplicator descompactará o arquivo zip e solicitará que você insira as informações do banco de dados do site local. Esse é o banco de dados que você criou anteriormente.

Duplicator database information

O nome do servidor é quase sempre localhost e o nome de usuário é root. Na maioria dos casos, a instalação do servidor local não tem uma senha definida para root, portanto, você pode deixá-la em branco.

Na parte inferior da página, você verá um botão “Test Database” (Testar banco de dados) que pode ser usado para garantir que as informações do banco de dados estejam corretas.

Test database connection

Se tudo estiver correto, clique no botão “Next” (Avançar) para continuar.

O Duplicator agora importará seu banco de dados do WordPress. Depois disso, ele solicitará que você verifique novamente as informações do novo site que ele detectou automaticamente.

Check local site information

Clique no botão “Next” para continuar.

O Duplicator concluirá a configuração e mostrará um botão para fazer login no seu site local. Você usará o mesmo nome de usuário e senha do WordPress que usa em seu site ativo.

Import finished

Isso é tudo, você conseguiu mover seu site ativo para o servidor local.

Método 2. Mover manualmente um site WordPress ativo para o servidor local

Caso o plug-in não funcione para você, é possível mover manualmente o site ativo para um servidor local. A primeira coisa que você precisa é fazer o backup manual do seu site a partir da conta de hospedagem do WordPress.

Etapa 1. Exportar o banco de dados do WordPress do seu site ativo

Para exportar o banco de dados do WordPress do seu site ativo, é necessário fazer login no painel do cPanel e clicar em phpMyAdmin.

Observação: Estamos mostrando capturas de tela do painel da Bluehost.

cPanel phpMyAdmin

No phpMyAdmin, você precisa selecionar o banco de dados que deseja exportar e, em seguida, clicar na guia Exportar na parte superior.

Export WordPress database manually

O phpMyAdmin solicitará que você escolha o método de exportação rápido ou personalizado. Recomendamos usar o método personalizado e escolher zip como o método de compactação.

Às vezes, os plug-ins do WordPress podem criar suas próprias tabelas no banco de dados do WordPress. Se você não estiver mais usando esse plug-in, o método personalizado permitirá que você exclua essas tabelas.

Deixe o restante das opções como estão e clique no botão “Go” (Ir) para fazer o download do backup do banco de dados em formato zip.

Select export options

O phpMyAdmin agora fará o download do arquivo do banco de dados. Para obter mais detalhes, consulte nosso tutorial sobre como fazer backup do banco de dados do WordPress manualmente.

Etapa 2. Faça o download de todos os seus arquivos do WordPress

A próxima etapa é fazer o download dos arquivos do WordPress. Para isso, é necessário conectar-se ao site do WordPress usando um cliente FTP.

Depois de conectado, selecione todos os seus arquivos do WordPress e faça o download deles em seu computador.

Download all your WordPress files

Etapa 3. Importe seus arquivos e banco de dados do WordPress para o servidor local

Depois de fazer o download dos arquivos do WordPress, você precisa criar uma pasta no servidor local para importar o site local.

Se você estiver usando o WAMP, deverá criar uma pasta dentro da pasta C:\wamp\www\ para o seu site local. Os usuários do MAMP precisariam criar uma pasta na pasta /Applications/MAMP/htdocs/.

Depois disso, basta copiar e colar seus arquivos do WordPress na nova pasta.

Em seguida, você precisa importar o banco de dados do WordPress. Basta abrir o phpMyAdmin em seu servidor local visitando o seguinte URL:

http://localhost/phpmyadmin/

Como você já criou o banco de dados anteriormente, agora precisa selecioná-lo e clicar na guia “Import” (Importar) na parte superior.

Import WordPress database

Clique no botão “Choose File” para selecionar e carregar o arquivo de exportação do banco de dados que você baixou na primeira etapa. Depois disso, clique no botão “Go” (Ir) na parte inferior da página.

O phpMyAdmin agora descompactará e importará seu banco de dados do WordPress.

Agora que seu banco de dados está configurado, você precisa atualizar os URLs dentro do banco de dados do WordPress que fazem referência ao seu site ativo.

Você pode fazer isso executando uma consulta SQL no phpMyAdmin. Certifique-se de ter selecionado o banco de dados do site local e, em seguida, clique em SQL.

Updating URLs in database

Na tela SQL do phpMyAdmin, copie e cole este código, certificando-se de substituir example.com pelo URL do seu site ativo e http://localhost/mylocalsite pelo URL do servidor local do seu site.

UPDATE wp_options SET option_value = replace(option_value, 'https://www.example.com', 'http://localhost/mylocalsite') WHERE option_name = 'home' OR option_name = 'siteurl';

UPDATE wp_posts SET post_content = replace(post_content, 'https://www.example.com', 'http://localhost/mylocalsite');

UPDATE wp_postmeta SET meta_value = replace(meta_value,'https://www.example.com','http://localhost/mylocalsite');

Essa consulta substituirá as referências ao URL do seu site ativo do banco de dados e o substituirá pelo URL do host local.

Etapa 4. Atualizar o arquivo wp-config.php

A etapa final é atualizar o arquivo wp-config.php de seu site local. Esse arquivo contém as configurações do WordPress, inclusive como se conectar ao seu banco de dados do WordPress.

Basta acessar a pasta onde instalou o WordPress em seu servidor local e abrir o arquivo wp-config.php em um editor de texto como o Bloco de Notas.

Substitua o nome do banco de dados pelo nome que você criou no phpMyAdmin em seu host local.

Depois disso, substitua o nome de usuário do banco de dados pelo seu nome de usuário local do MySQL, que geralmente é root. Se você tiver definido uma senha para o usuário root do MySQL em seu host local, digite essa senha. Caso contrário, deixe-o vazio e salve as alterações.

/** The name of the database for WordPress */
define('DB_NAME', 'database_name_here');

/** MySQL database username */
define('DB_USER', 'username_here');

/** MySQL database password */
define('DB_PASSWORD', 'password_here');

Agora você pode visitar o site local em uma janela do navegador inserindo o URL da seguinte forma:

http://localhost/mylocalsite/

Substitua “mylocalsite” pelo nome da pasta em que você copiou seus arquivos do WordPress.

Isso é tudo, seu site WordPress ao vivo está agora copiado para seu servidor local.

Esperamos que este artigo tenha ajudado você a aprender como mover facilmente um site WordPress ativo para o servidor local. Talvez você também queira consultar nosso guia sobre como criar facilmente um site de preparação para o WordPress para testes ou como mover um site do WordPress do servidor local para o site ativo.

Se você gostou deste artigo, inscreva-se em nosso canal do YouTube para receber tutoriais em vídeo sobre o WordPress. Você também pode nos encontrar no Twitter e no Facebook.

Divulgação: Nosso conteúdo é apoiado pelo leitor. Isso significa que, se você clicar em alguns de nossos links, poderemos receber uma comissão. Veja como o WPBeginner é financiado, por que isso é importante e como você pode nos apoiar. Aqui está nosso processo editorial.

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.

O kit de ferramentas definitivo WordPress

Obtenha acesso GRATUITO ao nosso kit de ferramentas - uma coleção de produtos e recursos relacionados ao WordPress que todo profissional deve ter!

Reader Interactions

257 ComentáriosDeixe uma resposta

  1. Syed Balkhi

    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. Reese

    Hello,

    I am receiving an error when reaching this step:

    “Now that your database is all set up, you need to update the URLs inside your WordPress database referencing to your live site. You can do this by running an SQL query in phpMyAdmin. Make sure you have selected your local site’s database and then click on SQL. In phpMyAdmin’s SQL screen copy and paste this code, make sure that you replace example.com with your live site’s URL and localhost/test-site with the local server URL of your site. ”

    The error is:
    #1146 – Table ‘rpd.wp_options’ doesn’t exist

    Please advise, thank you!

  3. Martin

    Thanks for all of your hard work. I’m a beginning web developer and your site is incredibly helpful.

    I have looked at both of your articles about migrating from local to live and vice versa. I built a WordPress site locally and used it to replace an existing HTML site. I then made changes to the live site, and I’m not quite sure how to go about “syncing” them again. What would you suggest?

  4. James

    Thank you for the article, however i have still been having problems.

    One thing i don’t understand, is that you start of by recommending using backupbuddy (which i have been using to backup my sites) but then suddenly say to use this duplicator plugin.

    I have my full backup (with db) zip of my wordpress site which i created with backupbuddy and have unzipped it into its own folder in the “www” folder in wamp.

    I successfully create a new DB in PhpMyAdmin and then successfully imported my website db into it. I have also changed the config.php db name and password.

    However on the next step, trying to change the urls it comes back with:

    #1146 – Table ‘zexico.wp_options’ doesn’t exist
    #1146 – Table ‘zexico.wp_posts’ doesn’t exist
    #1146 – Table ‘zexico.wp_postmeta’ doesn’t exist

    What have i done wrong?
    thank you

    • Ozi Diptongo

      Hi. I’m getting the same error. Were you able to fix it ? Than you !

  5. Nina Chang

    Following on from my earlier comment – I fixed the problem! For some reason the duplicator plugin wasn’t copying across all of my database tables, which was causing the first round of issues – I sorted that by switching to the manual method. Then when I was running the queries in mysql I didn’t realise at first that I had to amend the names of the database tables as well (i.e. was just pasting wp_options when I needed to adapt that) – I’m not sure if this is normal as your lines of code only highlight the urls as needing to be corrected? THEN I had to deal with my strange wp-config.php file that had all the ‘database’, ‘host’, ‘username’ fields already filled in – after trying both options it only worked when I deleted the data that wordpress had already filled in and replaced it with the localhost data as directed. I don’t understand why my wp-config file had its fields already populated but then I’m a complete newbie to all this so I’m bound to have missed/misunderstood lots. Anyway – thanks again for the tutorial as it did FINALLY get me there!

  6. Nina Chang

    Hi there,

    Thanks for the tutorial. I’ve attempted to migrate my site with duplicator and it seems to work except I then can’t log-in to my locally hosted site – it doesn’t recognise my username at all. After the duplicator installed my files I had two config.php files – one config-sample.php and one config.php, and also two htaccess files – one .htaccess and one ORIG – could these doubled-up files have something to do with my login issues? I’ve tried every variation of deleting one of each pair, and I’ve also tried replacing my wp-login file and deleting plugins as I read elsewhere this might help, but nothing has worked. I redid the entire process from packaging and still no luck! I’ve also tried manually but got stuck at the mysql query updates. Do you have any idea where I’ve gone wrong??

    Many thanks!
    Nina

  7. Susan Taunton

    I can’t tell you how grateful I am for this info. I have put an unbelievable amount of time into trying to get a live site onto my local server to no avail — and then I found your post today. Used the Duplicator and it WORKED!

    THANK YOU!!!!!!!!! :-))

  8. Dilip Pradhan

    I have copied website from hosting domain to local host. everything is fine but all links of menu and all are redirected to
    how to solve it

    • Byron Allen

      hi ,

      I had the same problem and just found the solution. I’m sure you’ve solved it by now but this might help others down the track.

      in WordPress admin area go to settings-> permalinks. Choose Post name.
      Your problems should be solved.

  9. John Payne

    Thanks for all the excellent advice you give- it’s a wonderful service to the Wordpress community.

    I’ve begun using the All-in-1 WP Migration plugin to easily backup my site , and later migrate it if necessary.

    It would also be good to be able to make changes to the sites on my own computer, checking them out before uploading updated files.

    I’, installing XAMPP on my computer. Is there an easy way I can use my All-in-1 WP Migration backup files with this?

    Any advice will be much appreciated.

    • WPBeginner Support

      Hi John,

      Sorry but we haven’t tested this plugin. Please try contacting the plugin developers.

      Administrador

  10. Andres

    Great tutorial. Its important to mention that you need to delete the HTACCESS File in order to this to work.

    Thanks

      • Siddhartha

        Yes from the local site folder. I did that, and my site started working. However there are many other problems that I am facing even now. Like my category links are not working at all.

  11. lohith

    cool super clean tutorial, got mine to work without any issues.

  12. Gokiko

    Hi WPbeginner,

    I have followed all the instructions for manual moving. But I’m getting a “Oops! That page can’t be found.” error on the mainpage, none of the content can be viewed. And all the links in my localhost site direct to my online website.

    It seems only the the main structure of my site(theme, menus etc.) has been moved but all the rest is lost.

    • WPBeginner Support

      Is this error shown with your WordPress theme or on a blank white page? If it is shown on a blank white page, then this probably means that your WordPress site is not installed on the URL you are trying.

      Administrador

      • Gokiko

        It shows on my WordPress theme. It also shows all my menus and content categories. But all the links take to the original websites address. Here is a screenshot if it’s gonna help:

        • WPBeginner Support

          Try refreshing your site’s permalink structure. Go to Settings » Permalinks page and click on the save changes button without making any changes.

        • Juan

          I have the exact same issue, but I can not log-in into my localhost using wp-admin or wp-login as it takes me to the live-site domain.

          Is there another way to login to my localhost/dev-site area to make this change? thanks in advance!

  13. Jason Hess

    Dear WPBeginner,
    First of all, Thank you for all you do in the WP community, my question is hopefully a pretty simple one. (Famous last words huh?) Currently I use CLEF to log in to my “Live Site”. When I move my Live site to my Local server, will this create any issues when attempting to log in to the local site once the move has been completed? Or do I need to create a new log in PW for my site via the Dashboard in my Live site before making the move to a Local environment or will CLEF still continue to work on my “Local Server”?
    Also, do you all have any thoughts on using CLEF to log in? I’ve been using WP on and off for about 2 years and just want to get your opinion on CLEF.
    Thank you very much in advance! You guys rock! After I get my site up and running you can bet I’ll promote your site to everyone I know. I’ve learned so much already from your site and I’ve only been a member for 2 almost 3 months now.

    Have a great Day,
    Jason Hess

  14. Mohd Amir

    I forgot the password of filezilla, so I couldn’t download all the file of live site. I have backup of live site wp_content only. What can I do now for local server.

  15. maarja

    Hi,

    Thank You for Your helpful directions.After a long while, I finally got the live page to my localhost with the plugin BUT for some reason, the content pages are not found on the server-all the information, texts etc is there in the back-office but aren’t shown in the front office except for the front page.
    Do You have any idea where/why the problem might occur?

    Thank You in advance,
    Maarja

  16. Yellow Canary

    Thank you very much :) I have done it manually… from a live server to localhost. With your instructions I have managed this for the first time. And I even know now how to do a SQL query in phpMyAdmin. I feel like a real pro!

  17. amna

    Hi,

    i followed all the steps but i am getting internal server error .

    I am confused in one step , after downloading the live site through filezill from godaddy host. i replace the wordpress folder with my live site folder i.e.

    C:/users/amna/wamp/www/wordpress/old folders

    with C:/users/amna/wamp/www/wordpress/mywebsite new folders

    please help i am a beginner

  18. Debenkumar Naorem

    Hi WEBBIGINNER SUPPORT, I followed the instruction for manual, it works very fine. Thanks for such intructions, I’ve been looking for this. Thanks again.

  19. Manish

    Hey! Thanks for the post.

    I followed manual instruction and replaced my site URL with localhost/name of blog . The problem I am facing is, no images are being loaded in my blog. All the uploaded images are there in upload folder. The text is absolutely fine. The images url have changed to localhost but they are not showing up.

    Could you please help me out in this?

  20. deepthi

    hi, i followed the manual procedure to check my wordpress website in localhost using xampp, i hav changed the site URL, home and the wp-posts and wp-postmeta. the problem is my home page loading fine in localhost. but when i go the pages in the menu the following error is coming.
    Object not found!

    The requested URL was not found on this server. The link on the referring page seems to be wrong or outdated. Please inform the author of that page about the error.

    If you think this is a server error, please contact the webmaster.

    Error 404

    localhost
    Apache/2.4.10 (Win32) OpenSSL/1.0.1i PHP/5.5.15

    i logged into dashboard and can see all of the page content in the editing section, but from there also, when i try to view the page its reporting the same error.
    the url path it is taking is my updatedURL only,
    please reply with the solution

    • WPBeginner Support

      Go to Settings » Permalinks page and click on the ‘Save Changes’ button to update your permalinks.

      Administrador

      • Joshua S.

        Can I hug you? Can I love you forever?
        I was having the same issue. I did everything correct, except the homepage would load , but all the other page links seemed to be broken (it just displayed an unstyled layout of my localhost information).

        But going into Settings>Permalinks>Save Changes reset my links and now I can access my different pages, even the new pages that I create since moving my site to the local host.

        LIKE!

  21. Peter

    After following the instructions to manually move the site, the home page displayed fine on localhost but none of the links worked. The page below said to “Go to settings/permalinks in the wordpress dashboard and update permalinks by clicking twice on save changes.” That fixed it.

    • Mohd Hasan

      I followed your steps , but only home page works fine and none of the links are working . Give The requested URL /akhdir3/category/health/ was not found on this server.

  22. Anes P A

    Dear Author,

    I tried your step. But problem is when loading a page the localhost refer online site and the Menu links point to the online web site. How it can solve ?

    Please advise.

    Thanks

    Anes

  23. Bhavana

    I have manually done all the above mentioned steps . But I am not getting the actual site which I want.There comes all uninstalled plugins in admin panel and the theme is also uncustomized. Where I am going wrong?

  24. Justin

    I’m trying to follow your instructions for a manual move.

    When trying to find/replace the live site’s address with my local host, SQL tells me there’s a syntax error.

    #1064 – You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near ‘)’ at line 1

    Are you sure the code is correct?

    • Justin

      Fixed my own problem….sort of.

      For some reason all my tables begin with wplm instead of just wp (wp_options = wplm_options for example). So updating the code to look for the correct table name allowed the script to run without errors.

      But….SQL reports “# MySQL returned an empty result set (i.e. zero rows)” and the values in the table didn’t get updated. I had to go in and update the links by hand. In my case this was only 2 values in wplm_options, but I could imagine some people will have a lot more links to check.

      Still, I do have my site imported now, and dealing with local hosting is a notoriously confusing process.
      Thanks for the clear and simple instructions!

  25. Lloyd

    The instructions for Duplicaor Installer begin with this line:
    “Your local server site will need a new database, so you need to create a database on your local server using phpMyAdmin.”
    Is creating a new database something simple like clicking a menu option, or is it so complex that it would require an extensive tutorial to explain?
    When I explore phpMyAdmin on Xampp, the only thing I see that looks like a possibility is under the Databases tab where it says:
    “Create database:
    (X) No Privileges”
    Is there an authorization problem, and if so where do I go to change that parameter?
    I have two web sites on this local host that seem to function properly, so I have assumed that the local host is set up correctly.

    Thanks for any help or suggestions,
    Lloyd

  26. Ashvani Kumar

    I am following the Manual option but when i go to Import Database page in phpMyAdmin then the max size for database upload is (Max: 2,048KiB) but my database backup size is 710MB. How do i increase this limit so that i can upload the database?

    Thanks

  27. Judy Williams

    I am trying this using Duplicator. I have downloaded my site and the installer. I have created a database using phpMyAdmin and have got to the bit ‘you need to copy and paste the package and install file to an empty folder in your local server’s web directory’. I have no idea how to do this! I have Filezilla and XAMPP installed on my laptop. Is there a tutorial on how to create an empty folder in my local server’s web directory? I am stuck now. Thanks

  28. german

    I’ve copied the files and database, when i try to access my localhost/test-site i get redirected to the dashboard. Any ideas why this could be happening?

  29. miguel

    thank you for the clear tutorial.
    although i’ve done the opposite (from localhost to public server) i thought the reverse would be equally simple.
    however, when it comes to connecting the database, i’m stumped. i’ve gone over the settings over and over without being able to connect.
    i even got into some trouble and got locked out of the database but fortunately got that resolved.
    in my config.php file i’ve changed the user to “root”, then set it to empty, used the user name from the public server and the same with the password. i have set the db name correctly to the localhost name.
    i can’t guess what i need to do.
    if you could give me a direction to look next, i’ll appreciate it greatly.
    thank you for you labor of love. it’s great to see so many people with the knowledge helping us those who look for answers.

  30. Daniel

    Hi

    I want to do this as well. Is this post written a few years back , still the approach to use or are the other plugins or post I should be looking at .

    Daniel

  31. Beatrix K.

    Hi everyone,

    Just wondering (please bare with me as I am new at this) – if I need to have have my local site to work with on two different devices, say my desktop and my laptop, is there a way for the changes I make on one device to be updated on the other device? I just want to know if it is possible to work from two different devices on the same project and not have to redo all of my changes. Thanks in advance for any insight :)

    B

  32. Muniba

    I am confused in step related to Filezeila ,,, how i will download my wordpress site using Filezeila..??

    • german

      download filezilla, establish a connection to your current host, productions site using filezilla. Once you have a connection you will be able to download the files to a local directory on your computer

      • Dee

        So with CPanel, for instance, we’d use the IP associated, our CPanel user and pass, along with “21” as the port value? After establishing a connection with Cpanel host, how can I transfer the files to my localhost while keeping the live site as well? Essentially, how do I create a duplicate with having the same site at both hosts (one to experiment with and one that remains live)?

      • Dee

        After successfully transferring files from remote to local, what is an easy way to bulk copy&paste (instead of manually one-by-one) the files to the local server where we want to install WordPress? I tried selecting all files to copy, but there is no copy function available. Please Help

  33. assal0le

    I want to copy my live wordpress site to my local wamp server, note moving it. My question is this will remove my live wordpress site if I follow this tutorial using duplicator plugin?

    Thx

    • Diane Laidlaw

      No it only copies it.

  34. Ognatius Chironga

    I thank you so much!
    I found this article helpful.

    I almost restarted creating my site.

  35. Quy P

    I have tested and tried a number of time. It does not work untill i delete the .htaccess file on local. Thank you.

  36. Tobias

    If you are running a network of sites you should also update the column domain URL’s in the table wp_blogs.

  37. lorenzo

    Thank for this useful tutorial. I have to move manually my wp site, but if I type in the browser “http://localhost/phpmyadmin/” it doesn’t appear myphpadmin. Maybe I have to install it? How?
    Thank you very much…

  38. Dave

    In the wp-config.php file I also have to change the /**MySQL hostname */

    /** MySQL hostname */
    define(‘DB_HOST’, ‘localhost’);

    set if for localhost

  39. nicola

    Hi,
    i follow your step but the admin login is not visible…. error 404 not found. all the site is good in my local installation. how can i solve my problem?

  40. abdelouahad

    i did all the steps but i have always the error page i don’t know why some one can help me please

  41. Paul Denver Sy

    Thank you so much for this. It saved my almost a week of agony on running it on my local.

  42. Shilling

    Double checked all the steps and it all seems good, but I’m getting this error message when I go to the site on my local URL:

    Google Chrome’s connection attempt to localhost was rejected. The website may be down, or your network may not be properly configured.

    I don’t think the site is down. My local URL is auto flipping to http://localhost/wordpress-folder-name
    when I think it should go to http://localhost:888/wordpress-folder-name

    I’m hoping this is an obvious clue. I’m new at this and just have no idea.

    Any insight would be much appreciated.

  43. Ebert

    This was the clearest tutorial I found which helped me to copy a site I started with iPage to my laptop under localhost. The database was not imported but created a new local copy of the server database. I copied the data tables into my new database and modified the sql commands to match the table names and everything ran smoothly.
    I had to reuse the password I used on the live site with the local wordpress copy and I can now access and modify what I need to.
    Thanks and you just got another new subscriber to this great site. :)

    Also the post about BackWPup was very helpful as well. I tried to use Duplicator and it kept giving me error messages about permissions to create a backup folder on my machine. I used BackWPup and everything ran without a hitch. Thanks again!! :)

  44. Eduardo Weidman Barijan

    The manual process worked like a charm. Thank you.

  45. Alessio

    Hi guys,
    I’m trying to config the localhost on my computer with linux mint.
    i’ve already set up a new database, transferred the files with FTP to my local wordpress folder.
    Now I imported the db, but when I give the query to change the webaddress with a local address, it will give me a message “# MySQL returned an empty result set (i.e. zero rows)”.
    Now, if I type in the browser “localhost”, it will lead me to the online website…
    what should I do?
    thank you!

    • idriss

      Hey Allesio,

      Did you manage to solve this?

      I have the same issue. How did you manage to solve it?

      Thanks

      • Justin

        Same problem here.
        SQL is having trouble replacing the live site URL with the local host address.

        Without the updates to the database, WP tries to connect to the live site instead of the local site.

        Did either of you have any luck fixing this?

        • Sam

          Go to your localhost phpmyadmin and the database you are using for the site. Click wp_options and edit the siteurl and home. Replace the live url with the: localhost/ your-folder-name-goes-here

          That should do it.

          Sam

  46. Mike

    The first step worked with me.
    But how can I enter to localhost/test-site/wp-admin? It gives me an error message:

    Internal Server Error

  47. Wenke Adam

    Updating the local site’s wp-config.php file might not be the last step in this procedure. I followed your instructions and after some trials the public site was working (first I had a typo in the SQL queries and nothing happened) but still I couldn’t access wp-admin.

    The solution was to edit the wp_options table in the database. The first row had the wrong URL. I fixed this and finally everything was working fine, even the permalinks.

    Thanks for all these very nice and clear tutorials!

  48. Tim

    I am reposting this because it seems to have disappeared (at least on my end). So I am sorry if it is a double post.

    I am getting an error message when uploading the database. Any ideas?

    Thanks

  49. Tim

    When I try to upload the database I get a Red Error Screen. I can send a screenshot of the error if you would like.

    Thanks

    • WPBeginner Support

      Sure, you can upload the screenshot to a cloud hosting service like dropbox and paste the link as a reply to this comment. We will then take a look and will try to help.

      Administrador

  50. Ian Hyndman

    All day I have been trying to do this change with no effect !
    I even had to install word press again on my testing server. Was about to give up then I came across this. My other option was to manually copy and paste and install all the same plugins active on my host server to my testing server.
    When i read your post i finished in 5 minutes :):)

    Thank you for your tutorial, its just what I needed. !
    Well Done ;)

  51. Alexandros

    Two days i am trying to do this change alone with no effect !
    When i read your post i finished in 5 minutes :):)

    Thank you for everything !
    Keep up the great work ;)

Deixe uma resposta

Obrigado por deixar um comentário. Lembre-se de que todos os comentários são moderados de acordo com nossos política de comentários, e seu endereço de e-mail NÃO será publicado. NÃO use palavras-chave no campo do nome. Vamos ter uma conversa pessoal e significativa.