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 o WordPress para um novo host ou servidor sem tempo de inatividade

Nota editorial: Ganhamos uma comissão de links de parceiros no WPBeginner. As comissões não afetam as opiniões ou avaliações de nossos editores. Saiba mais sobre Processo editorial.

Está planejando mover seu site WordPress para uma nova empresa de hospedagem ou para um servidor diferente?

O maior risco ao trocar de hospedagem na Web ou migrar um site para um novo servidor é a perda de dados e o tempo de inatividade.

Neste tutorial passo a passo, mostraremos como migrar com segurança seu site WordPress para um novo host sem nenhum tempo de inatividade. Também responderemos às perguntas mais comuns sobre como mover um site WordPress para um novo provedor de hospedagem.

Migrating WordPress from one host to another

Importante: antes de começarmos, queremos que você saiba que muitas empresas de hospedagem WordPress oferecem um serviço de migração gratuito. Talvez ele não esteja listado no site da empresa, portanto, tudo o que você precisa fazer é perguntar. Normalmente, é gratuito, mas algumas podem cobrar uma pequena taxa.

Dito isso, vamos dar uma olhada nas etapas que abordaremos para mover o WordPress para um novo servidor de hospedagem (sem nenhum tempo de inatividade):

Pronto? Vamos começar.

Etapa 1: Escolha seu novo host para WordPress

Se você estiver preso a um host lento, mesmo depois de otimizar a velocidade e o desempenho do WordPress, é hora de mover seu site WordPress para um novo host que possa lidar com seu tráfego crescente.

Ao procurar um novo provedor de hospedagem WordPress, é importante escolher com cuidado para não ter que mudar novamente tão cedo.

Veja quem recomendamos:

  • Para uma hospedagem compartilhada confiável, recomendamos a Bluehost. Eles são oficialmente recomendados pelo WordPress.org. Usando nosso cupom Bluehost, os usuários do WPBeginner obtêm até 61% de desconto e um nome de domínio gratuito.
  • Para uma hospedagem compartilhada mais rápida, recomendamos a Hostinger. Eles estão entre as principais empresas de hospedagem WordPress e oferecem servidores mais rápidos com excelente suporte ao cliente.
  • Se estiver procurando por hospedagem em nuvem ou provedores específicos de local, recomendamos que consulte o SiteGround. Eles têm data centers em três continentes diferentes.
  • Se estiver procurando uma hospedagem gerenciada para WordPress, recomendamos que consulte o WP Engine. Eles são o melhor e mais conhecido provedor do setor.

Depois de comprar sua nova hospedagem, NÃO instale o WordPress. Faremos isso em uma etapa posterior.

Por enquanto, sua nova conta de hospedagem na Web deve estar vazia, sem arquivos ou pastas em seu diretório principal.

Etapa 2: Configurar o Duplicator para facilitar a migração

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

O Duplicator é o melhor plug-in de migração do WordPress no mercado. Ele também vem com backups programados automatizados, suporte a armazenamento em nuvem, restauração com um clique e migrações inteligentes.

Observação: O Duplicator também tem uma versão gratuita chamada Duplicator Lite. Ela pode ser usada para mover seu site, mas tem recursos limitados em comparação com a versão profissional.

Depois de instalar e ativar o Duplicator, acesse a página Duplicator ” Packages (Pacotes ) na área de administração do WordPress.

Em seguida, você precisa clicar no botão “Create New” (Criar novo) no canto superior direito.

Make new Duplicator package

Isso iniciará o assistente de backup do Duplicator.

Na próxima tela, você pode opcionalmente fornecer um nome para o backup ou simplesmente clicar no botão “Next” (Avançar) para continuar.

Duplicator package creation

Em seguida, o Duplicator fará uma varredura em seu sistema para garantir que tudo esteja em ordem para preparar o pacote.

Certifique-se de que os resultados da varredura estejam corretos (tudo deve estar “Bom”) e, em seguida, clique no botão ‘Build’.

Duplicator scan

O processo pode levar vários minutos para ser concluído, portanto, deixe a guia aberta enquanto o plug-in faz seu trabalho.

Quando o processo for concluído, você verá opções de download para o Installer e o pacote Archive. Você precisa clicar no botão “Download” e, em seguida, selecionar “Both Files”.

Download Duplicator migration files

O arquivo compactado é uma cópia do seu site completo e o arquivo do instalador automatizará o processo de instalação para você.

Etapa 3: Importar seu site WordPress para o novo host

Agora que você fez o download dos arquivos compactados e do instalador, a próxima etapa é carregá-los em seu novo host da Web.

Para isso, conecte-se ao seu novo host da Web usando FTP.

Se você nunca fez isso antes, consulte nosso guia para iniciantes sobre o upload de arquivos via FTP para o WordPress.

Normalmente, você digitaria o nome de domínio do seu site como host ao conectar o cliente FTP.

No entanto, como seu nome de domínio ainda aponta para o host antigo, você precisará se conectar inserindo o endereço IP ou o nome de host do servidor.

Você pode encontrar essas informações no painel do painel de controle da sua nova conta de hospedagem.

Server IP address

Se não conseguir encontrar essas informações, solicite suporte à sua nova empresa de hospedagem na Web, que o ajudará.

Usando o cliente FTP, você precisa carregar o arquivo installer.php e o arquivo .zip no diretório raiz do seu site.

Normalmente, essa é a pasta /username/public_html/.

Novamente, se não tiver certeza, pergunte à sua empresa de hospedagem na Web.

Certifique-se de que seu diretório raiz esteja completamente vazio. Algumas empresas de hospedagem na Web instalam automaticamente o WordPress quando você se inscreve.

Se você tiver o WordPress instalado no diretório raiz, será necessário excluir o WordPress primeiro.

Feito isso, você precisa carregar o arquivo zip e o arquivo installer.php no diretório raiz do seu site.

Etapa 4: Altere o arquivo Hosts para evitar tempo de inatividade

Depois de fazer upload dos dois arquivos para o novo host, é necessário acessar o arquivo installer.php em um navegador.

Normalmente, esse arquivo pode ser acessado usando um URL como este:

http://www.example.com/installer.php

No entanto, esse URL o levará ao seu antigo host da Web e você receberá um erro 404. Isso ocorre porque seu nome de domínio ainda aponta para seu antigo host da Web.

Normalmente, outros tutoriais podem dizer para você alterar os nameservers do seu domínio e apontá-lo para a nova empresa de hospedagem, mas isso está errado.

Se você fizer isso agora, seus visitantes verão um site quebrado quando você o migrar.

Mostraremos como você pode acessar temporariamente o novo site no seu computador sem afetar o site antigo.

Isso é feito com o arquivo hosts em seu computador.

O arquivo hosts pode ser usado para mapear nomes de domínio para endereços IP específicos. Em outras palavras, ele permite que você engane seu computador para que ele pense que o site foi movido, embora não seja.

Vamos dar uma olhada em como adicionar uma entrada para o seu nome de domínio no arquivo hosts para que ele aponte para a sua nova empresa de hospedagem.

Ao fazer essas alterações, você poderá acessar os arquivos no novo host usando seu próprio nome de domínio, enquanto o resto do mundo ainda estará acessando seu site a partir do host antigo. Isso garante 100% de tempo de atividade.

A primeira coisa que você precisa fazer é encontrar o endereço IP do seu novo servidor de hospedagem na Web.

Para encontrar isso, é necessário fazer login no painel do cPanel e clicar no link expandir estatísticas na barra lateral esquerda. O endereço do seu servidor será listado como “Endereço IP compartilhado”.

Por exemplo, na Hostinger, você encontrará o endereço IP do seu servidor nos detalhes do seu plano de hospedagem.

Hostinger server IP

Se estiver usando um PC com Windows, será necessário abrir o aplicativo Notepad com privilégios de administrador.

Basta clicar no botão “Iniciar” e procurar o aplicativo Notepad. Clique com o botão direito do mouse no ícone do aplicativo Notepad e selecione “Executar como administrador”.

Run Notepad as administrator

Será exibido um prompt do UAC do Windows e você precisará clicar em “Yes” (Sim) para iniciar o Notepad com privilégios de administrador.

Na tela do Bloco de Notas, vá para Arquivo ” Abrir e navegue até a pasta C:\Windows\System32\drivers\etc. Nessa pasta, selecione o arquivo hosts e abra-o.

Se você estiver usando um Mac, precisará abrir o aplicativo Terminal e digitar este comando para editar o arquivo hosts:

sudo nano /private/etc/hosts

Para usuários de Windows e Mac, na parte inferior do arquivo hosts, é necessário inserir o endereço IP copiado e, em seguida, o nome do domínio. Assim:

192.168.1.22 www.example.com

Certifique-se de substituir o endereço IP pelo endereço que você copiou do cPanel e example.com pelo seu próprio nome de domínio.

Quando terminar, salve suas alterações.

Agora você pode acessar seus arquivos no novo host usando o nome de domínio no seu computador.

Importante: Não se esqueça de desfazer as alterações feitas no arquivo hosts depois de concluir a migração (etapa 6).

Etapa 5: Criação do banco de dados MySQL em seu novo host

Antes de executarmos o instalador no novo host, será necessário criar um banco de dados MySQL na sua nova conta de hospedagem. Se você já tiver criado um banco de dados MySQL, poderá pular para a próxima etapa.

Criação de um banco de dados no cPanel

Vá para o painel cPanel da sua nova conta de hospedagem, role para baixo até a seção Bancos de dados e clique no ícone “Bancos de dados MySQL”.

Você verá um campo para criar um novo banco de dados.

Digite um nome para o seu banco de dados e clique no botão “Create Database” (Criar banco de dados).

Create database

Depois de criar o banco de dados MySQL, é necessário rolar para baixo até a seção Usuários do MySQL.

Em seguida, forneça um nome de usuário e uma senha para o novo usuário e clique no botão “Create User” (Criar usuário).

Create database username and password

Depois disso, você precisa adicionar esse usuário ao seu banco de dados. Isso dará ao nome de usuário que você acabou de criar todas as permissões para trabalhar nesse banco de dados.

Para isso, role a tela para baixo até a seção “Adicionar usuário a um banco de dados”. Basta selecionar o usuário do banco de dados que você criou no menu suspenso ao lado do usuário, selecionar o banco de dados e clicar no botão “Add” (Adicionar).

Add user to database

Seu banco de dados agora está pronto para ser usado com o WordPress. Não se esqueça de anotar o nome do banco de dados, o nome de usuário e a senha. Você precisará dessas informações na próxima etapa.

Etapa 6: iniciar o processo de migração do Duplicator

Agora, estamos prontos para executar o instalador. Navegue até o seguinte endereço na janela do navegador, substituindo example.com pelo seu nome de domínio:

http://www.example.com/installer.php

Duplicator installer

O instalador executará alguns testes e mostrará “Pass” ao lado dos testes de arquivamento e validação.

Você precisa marcar a caixa de seleção dos termos e condições e continuar clicando no botão “Next” (Avançar).

Agora, você será solicitado a inserir o host do MySQL, o nome do banco de dados, o nome de usuário e a senha.

Seu host provavelmente será localhost. Depois disso, você digitará os detalhes do banco de dados que criou na etapa anterior.

Enter database details

Em seguida, o Duplicador precisa verificar se consegue se conectar ao banco de dados e executar a instalação.

Clique no botão “Validate” (Validar) na parte inferior para continuar.

Validate database information

Se o Duplicator conseguir se conectar, você verá os resultados do teste como Pass.

Agora você pode marcar a caixa de seleção dos termos e avisos e clicar no botão “Next” (Avançar).

Accept terms and continue

Clique no botão “Next” (Avançar) para continuar.

O Duplicator agora importará o banco de dados do WordPress do arquivo zip para o novo banco de dados.

Em seguida, ele solicitará que você atualize o URL ou o caminho do site. Como você não está alterando os nomes de domínio, não é necessário alterar nada aqui.

Basta clicar no botão “Next” para continuar.

O Duplicator executará as etapas finais e mostrará o botão de login.

Duplicator migration finished

Agora você pode fazer login no seu site WordPress no novo host para garantir que tudo esteja funcionando como esperado.

Etapa 7: Atualize seus servidores de nomes de domínio (DNS)

Nesse ponto, você criou uma cópia completa do banco de dados e dos arquivos do WordPress no novo servidor de hospedagem, mas seu domínio ainda aponta para a conta antiga de hospedagem na Web.

Para atualizar seu domínio, você precisa trocar seus servidores de nomes DNS. Isso garante que os usuários sejam levados para o novo local do seu site quando digitarem seu domínio nos navegadores.

Se você registrou seu domínio com seu provedor de hospedagem, é melhor transferir o domínio para um novo host.

Por outro lado, se você usar um registrador de domínios como Domain.com, GoDaddy ou Network Solutions, precisará atualizar seus servidores de nomes.

Você precisará das informações do servidor de nomes DNS do seu novo host da Web. Geralmente, são alguns URLs que se parecem com estes:

ns1.hostname.com
ns2.hostname.com

Para fins deste guia, mostraremos como alterar os servidores de nomes DNS com a GoDaddy.

Para outros provedores de hospedagem, dê uma olhada em nosso guia sobre como alterar os servidores de nomes de domínios.

Dependendo do seu registrador de domínios ou host da Web, as capturas de tela podem parecer diferentes. No entanto, o conceito básico é o mesmo.

Você precisa procurar a área de gerenciamento de domínios e, em seguida, procurar os servidores de nomes. Se precisar de ajuda para atualizar seus servidores de nomes, solicite à sua empresa de hospedagem na Web.

No caso da GoDaddy, você precisa fazer login na sua conta da GoDaddy e, em seguida, clicar em “Domains” (Domínios).

Depois disso, você precisa clicar no botão “Manage” (Gerenciar) ao lado do nome de domínio que deseja alterar.

Manage domain

Vá para a seção “Additional Settings” (Configurações adicionais).

Em seguida, você precisará clicar em “Manage DNS” (Gerenciar DNS) para continuar.

Manage DNS

Em seguida, role a tela para baixo até a seção “Nameservers”.

Aqui, clique no botão “Change” (Alterar).

Change nameservers

Primeiro, você precisará mudar o menu suspenso do tipo de servidor de nomes de “Padrão” para “Personalizado”.

Depois disso, você pode preencher as informações do seu novo provedor de hospedagem em Nameservers.

Updating DNS nameservers

Não se esqueça de clicar no botão “Salvar” para armazenar suas alterações.

Você alterou com êxito os servidores de nomes do seu domínio. As alterações de DNS podem levar de 4 a 48 horas para serem propagadas para todos os usuários.

Como você tem o mesmo conteúdo no host antigo e no novo, seus usuários não verão nenhuma diferença. Sua migração do WordPress será perfeita, sem absolutamente nenhum tempo de inatividade.

Por segurança, recomendamos que você espere para cancelar sua conta de hospedagem antiga até 7 dias após a migração.

Perguntas frequentes

Aqui estão algumas perguntas que muitos de nossos usuários fazem ao mover o WordPress de um host para outro.

1. Como faço para migrar meu site WordPress para outro host?

Você pode migrar seu site WordPress movendo os arquivos e o banco de dados do WordPress do host antigo para o novo provedor de hospedagem.

Algumas empresas de hospedagem também oferecem serviços gratuitos de transferência de sites, mas você precisará perguntar a elas. Como alternativa, você pode fazer isso sozinho, transferindo arquivos usando um cliente FTP e importando o banco de dados via phpMyAdmin.

2. Posso migrar meu site WordPress para outro provedor de hospedagem?

Sim, você pode migrar seu site WordPress para outro provedor de hospedagem.

3. Posso me inscrever na nova conta de hospedagem sem registrar um nome de domínio?

Sim, você pode se inscrever em uma conta de hospedagem sem registrar um nome de domínio.

Nome de domínio e hospedagem são dois serviços diferentes, e você não precisa necessariamente registrar um nome de domínio ao se inscrever em um novo host. Para obter mais detalhes, consulte nosso guia sobre a diferença entre nome de domínio e hospedagem na Web.

Alguns provedores de hospedagem solicitarão que você selecione um nome de domínio como a primeira etapa da compra da hospedagem. Eles também permitirão que você insira um nome de domínio se já tiver um.

4. Preciso transferir meu nome de domínio para o novo host?

Não, você não precisa transferir seu nome de domínio para o novo host. No entanto, a transferência do seu nome de domínio para a nova hospedagem facilitará a renovação e o gerenciamento no mesmo painel da sua nova conta de hospedagem.

Para saber mais sobre esse tópico, consulte nosso guia definitivo sobre nomes de domínio e como eles funcionam.

5. Como faço para corrigir o erro de estabelecimento de conexão com o banco de dados no Duplicator?

Se estiver vendo um erro de conexão com o banco de dados ou o erro de conexão com o banco de dados no Duplicator, provavelmente você inseriu informações incorretas na conexão com o banco de dados.

Certifique-se de que o nome do banco de dados, o nome de usuário do MySQL e a senha estejam corretos. Algumas empresas de hospedagem na Web não usam o localhost como host para seus servidores MySQL. Se esse for o caso, será necessário solicitar à equipe de suporte do seu host da Web que forneça as informações corretas.

6. Como verifico se meu site está carregando no novo host?

Há várias ferramentas on-line que permitem ver quem está hospedando um site. Depois de transferir seu site para o novo host, você pode usar qualquer uma dessas ferramentas e elas mostrarão o nome da empresa de hospedagem na Web que está hospedando seu site.

Se não faz muito tempo que você migrou seu site e fez alterações no servidor de nomes de domínio (DNS), é provável que seu site ainda esteja carregando no host antigo. As alterações de nome de domínio podem levar até 48 horas para serem totalmente propagadas.

7. Preciso excluir algum arquivo ou dado do host antigo?

Ao trocar de empresa de hospedagem, recomendamos que você mantenha seu site antigo por pelo menos uma semana. Depois disso, você poderá excluir os arquivos do seu antigo host da Web. Se estiver cancelando sua conta, o provedor de hospedagem na Web excluirá todos os seus dados de acordo com a política dele.

8. Por quanto tempo devo manter minha conta ativa no host antigo?

Depois de migrar seu site para o novo host, e se você não tiver nenhum outro site hospedado no host antigo, poderá cancelar a conta de hospedagem antiga.

Entretanto, em alguns casos, você pode já ter pago a eles pela hospedagem anual. Você deve verificar a política de reembolso deles para ver se tem direito a algum reembolso após o cancelamento.

9. Como faço para mover um site WordPress com SSL/HTTPS?

Você precisará instalar um certificado SSL em seu novo provedor de hospedagem. Depois disso, você pode seguir as mesmas etapas mencionadas acima. Apenas certifique-se de usar HTTPS nos URLs, como em https://example.com

10. Bônus: Migração gratuita do site pelo seu novo host

Se você deseja mudar sua hospedagem na Web, mas as etapas acima parecem muito complicadas, escolha os seguintes provedores e eles migrarão seu site para você.

SiteGround, Hostinger e WP Engine oferecem migração gratuita de sites para usuários do WPBeginner.

Esperamos que este guia passo a passo tenha ajudado você a migrar o WordPress para seu novo host sem nenhum tempo de inatividade. Se você tiver algum problema com a migração do WordPress, consulte nosso guia sobre os erros mais comuns do WordPress e como corrigi-los.

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

299 ComentáriosDeixe uma resposta

  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. Shane says

    In the next step, Windows users need to go to Programs » All Programs » Accessories, right click on Notepad and select Run as Administrator. A Windows UAC prompt will appear, and you need to click on Yes to launch Notepad with administrator privileges.

    On the Notepad screen, go to File » Open and then go to C:\Windows\System32\drivers\etc. Select hosts file and open it.

    I’m having trouble with this step. Can anyone shed any light?

  3. Muhammed Shabeer says

    Thanks for the wonderfull trick. Exactly the trick was intented to migrate WordPress to new host, but I used for migrating from root to subdomain/subfolder. It done successfully with the plugin. Thank for sharing the trick.

  4. Max says

    Sadly, this didn’t work for me either. I deleted all the website files as directed , uploaded to the installer.php file and package but when I went to website.com/installer.php I was served a 404 error: Not Found

    The requested URL /installer.php was not found on this server.

    I think it’s easier to just transfer the website the old fashioned way, as others have mentioned. No need for any scripts that might not work.

    • Max says

      Please disregard my comment. I later noticed the root folder was set to httpdocs. So created a folder, named it httpdocs and put the package and installer.php in there. Then the website.com/installer.php worked no problem. All went very smoothly thereafter.

    • Nandan Jha says

      Hello Max,

      Actually it did work for me in the end. I am guessing that you moved the installer and archive to your new host , correct ?

      Please look up the IP address from cpanel or equiv of the new host and try accessing via the IP address

      http://IPAddress/installer.php

  5. KB says

    Seems like a good tutorial, but I had no luck with it. There are also a few steps/screens in the Duplicator sequence that were different from mine. The end result was, I got a 404 error upon clicking Site Login – Login to finalize the setup in Step 4 of 4 of the Test Site screen. This differs substantially from the above. Top right corner there’s a version number of 1.2.30. Fairly certain I have the most up to date version of the plugin. If I use File Manager to view the contents of public_html I don’t see the normal list of wp files that I think I should see aside from a wp-snapshots directory, a few web.config files, some installer files and the archive.zip…oh and database.sql. So something has clearly gone wrong, but I’m at a loss to understand what. So…there it is.

    • Stephen Duffield says

      Let me guess, you tried to move from a WordPress.com site? Duplicator & Duplicator Pro wont work for wp.com sites. Nothing works unless you use one of two host sites that they recommend. Duplicator after lots of help, ended up giving me a refund.

  6. Nandan Jha says

    Great article.

    Friends, How do I make it work for an Addon Domain. I took a new plan with GoDaddy and now need to move my sites there. What entry do I make in my hosts file to navigate to install.php ? Thank you,

    • Nandan Jha says

      I tried it with my AddOn Domain. It worked for me over a couple of iterations. The thing to take care of is to supply the right ‘domain name’ at Step 3 (or Step 4). The default value which it picks is ‘primarydomain.com/addondomain’. Delete the default value and put addondomain.com

      Thanks.

  7. Sean says

    I recently switched hosts and my original hosting plan has expired. I failed to create a back up before it expired. I do have a local copy of my site on my computer (I use Dreamweaver for FTP). Is there any way to recreate the site with the local files?

    Thanks.

    • Dave Porter says

      Hi Sean,
      Try using WayBack Machine – it takes snapshots of websites over time…
      You may be able to grab the source code, images etc… and recreate it from that. I’ve had to do that a few times for clients who have come to me after they have lost contact with their developer…
      HTH, Dave

      • Miki says

        Hi there,
        I have used the Wayback machine and was able to make a copy of my site. Unfortunately I have found myself involved with an unsavory company that had other plans for my business (selling their services on my site) without full disclosure in the beginning. I am now tasked with finding a new programmer to finish the site although it is in wordpress. I do not have wordpress at this time as I was not developing the site; however my understanding from these posts is that if I move the site to another host, I should be able to access wordpress. Is that correct?

  8. Michael says

    update…

    it works….
    be careful with IP address information…. you should read the information carefully…

    Thanks

  9. Michael says

    No luck..

    After change the host file, my browser shows message:
    This site can’t be reached
    example.com took too long to respond.
    Search Google for idea inspirations
    ERR_CONNECTION_TIMED_OUT

    I did flush dns, net stop, dan net start and restart my computer & modem, still not working…

  10. Navajo says

    I have another question:

    In the text it says:

    “At this point, you’ve created a complete copy of your WordPress database and files on your new hosting server. But your domain still points to your old web hosting account.

    To update your domain, you need to switch your DNS nameservers. This ensures that your users are taken to the new location of your website when they type your domain into their browsers.

    If you registered your domain with your hosting provider, then it’s best to transfer the domain to the new host.”

    I thought that when i buy a new hosting space, i also and immediatly have to name a doman name. As in: buying a hosting space is always linken to buying a domain. So the new ip addres which i have uploaded my old site to, and which i have to link to my old doman name, already HAS a (newly bought) domain name.

    Or can i buy a hosting space, ánd get an IP address which i can use in this tutorial, without it already having a domain name?

    Regards, Navajo

    • WPBeginner Support says

      Hi Navajo,

      It is a common misconception. Hosting and domain name are two different services and you can buy them from two different companies. On the same page where hosting companies offer you to register domain name, they also show another option to indicate that you already have a domain name and you can continue without registering a new one.

      For more details please see our detailed guide on What is a domain name and how do domains work?

      Administrador

  11. Uldis says

    this is really profound stuff. I was just scratching my head how to migrate client’s site without interruption while changing name servers. Eternally grateful!

    • Dave Porter says

      Shadat – this is quite an old article now – and you don’t give very much to go on – I would seek help from your hosting company, or get onto a WordPress discussion forum where there are active people who may be able to help you.
      But if you are getting a database connection error message, it is generally because the database name/user or password is incorrect
      I would try one of the backup tools like Duplicator and see if that works better for you.

    • Slade says

      Did you set up a new database and user on your new host?

      You must make sure the database name and user and password are all correct for the new host.

      Usually a database connection error is a simple oversight like a mispelling or something simple like that.

  12. Michael Goriany says

    Thanks for this excellent tutorial :-)
    If I have well understood, the hosts file (Step 4) is providing for 100% uptime only for the Webmanager but not for the public
    How can the DNS switchover time be shortened, or how can the downtime for the public be avoided ?

    • Slade says

      Editing the host file allows you to see your site at your new host. Until you update your dns nameservers the public will go to the old host.

      The time it takes for dns changes to updare (propagate) is not something that can be controlled. However this guide is correct in providing a no down time solution.

      What is happening on the backend that the public does not see is that your website is being hosted at two hosts. The nameservers tell the public which host they are viewing the site on. During the dns update process the users will still view the site at the old host until the propogation is complete.

      Once the dns change officially kicks in the public will then be viewing the site at your new host.

      Again, to provide the no downtime transfer you would need to change your host file on your local machine (tells your computer you want to view the site at the new host).

      This allows you to do the actual install of your website on the new host.

      Hope that helps

  13. Lydia says

    i had to move a client’s site off our subdomain into their own hosting overnight and this REALLY REALLY saved my life! Especially as the domain needed to be repointed seamlessly! I only had trouble with the FTP, i dunno what was wrong with all the logins but i couldn’t get it working. Thankfully my hoster always has an awesome file manager on cpanel.

    So yes, very nearly seamless, i’m just testing out the contact forms now which seems to need the DNS switchover time in order to function properly…
    And one thing to add, Duplicator has changed the SQL database setup to Step 2 in their latest version, which really made me freak out a bit there.

    Thanks very much for the detailed and extremely godsent tutorial!

  14. Kurt says

    I’m getting ready to follow this tutorial. One question: I am switching servers but also am switching domain names. Should I change my website address in the WP admin settings before running duplicator or after? (Does the order matter?) Thanks!

  15. Ravijit says

    Hey,

    I used this plugin so many times. even, once i used it for too. I really like this plugin but, the problem is it do not extract the big package. We’ve to manually unzip it or need to upload unzipped data to the new hosting.

    Any fix for that? Reply as soon as possible.

  16. Archit says

    Duplicator doesn’t work properly with GoDaddy’s cPanel Linux Hosting service. Script gets terminated even if the settings in php.ini are changed. Please suggest what to do to make Duplicator work there? If not possible, what would be the best alternative?

  17. Susan Taunton says

    This GREAT tutorial successfully guided me through my very first migration of a WordPress site to a different host! Especially life saving was the instruction about changing “sudo nano /private/etc/hosts” in Terminal – worked like a charm. wpbeginner.com has the most succinct, articulate and smart tutorials, which I have come to depend on.

    Thank you!!!!
    Susan

  18. Prinze says

    hi, pls have been having issues uploading my site to s new server using FTP client, my hosting company tried to give tutorials on how to transfer with no result.
    the tutorials am getting from your site is abt using a duplicate plugin. my site is down, i can’t access my wp-admin to install the plugin.
    i use a backup plugin when my site is up so i have a backup file from the plugin i used n also i did a cpanel backup from my old server.
    pls, i need a tutorial hoe to upload my backup files to my new server, which one is best to upload?
    the plugin backup or the cpanel backup…

    pls help!

  19. Ritadrik Chowdhury says

    Hi Sir,
    I am stuck up with 3rd part which is verification part. I have changed the permalinks and I can see the dashboard as usual but the site is not running. Whenever I am clicking on “TEST SITE” it returns error 404: File Not Found. I tried their help documents. Made changes as usual but no luck. Can you please help me out?

  20. saurabh shelar says

    Hello Sir. I am saurabh from India. I love your website. I have a blog about software review. And I saw your posts and observe that you edited image in microscope effect. This is really fantastic. Can you please tell me how you do this or please make tuts for this please.

    Thank you.

  21. Brad says

    Hello,
    I have a situation where it would be ideal to have the database on separate hosting. Just because the host of the current site does not offer mysql. I cannot move the site (for a company)

    Can I install wordpress on current hosting in a sub domain and have the database on another host? I have never used anything except “localhost” in the wp-config file? Thank you!

  22. Samuel says

    Does it work on addon domain?

    Because there is this step

    “Make sure that your root directory is completely empty. If you have WordPress installed in your root directory, then you need to delete WordPress first”

    While my primary domain is already up and running

  23. Cory says

    This is a well put together article, nice job guys!

    Just as an FYI for users reading through the comments, any comment pre-dated 12-6-2016 does not pertain to the article above or the Duplicator plugin specifically.

    This article was originally written using the Backup Buddy plugin and has since been updated and rewritten using the Duplicator plugin. This should help clear-up any confusion should some of the comments not really make sense or refer to topics not covered in the article.

  24. Mark Rudder says

    This is an excellent tutorial.
    I also believe this is the easiest and fastest way to to migrate a site.
    Migrating DB files and tables with phpMyAdmin is the long way around.
    Using Duplicator or BackupBuddy is way less work and you are less prone to mistakes that way.

    You need to change DNS no matter what method you choose, so that aspect can’t be counted as far as which method is best.

    Changing TTL settings to 1 hour (3600 seconds) as Dave Porter pointed out is the only missing piece of the puzzle. (even though that is not essential to success)

  25. Augusto says

    Nice article, guys!

    I feel that the most critical point migrating a site to another host is the email service. If the default email solution provided by host need to be replaced, a lot of work will came.

    Anyone want to share your workflow to do this kind of thing?

    Thanks!

  26. Frans Kemper says

    hello,

    Would this procedure also work for sub domains?
    I have an add on domain to transfer with about 10 related sub domains.
    Thank you

  27. Dave Porter says

    A few days before I move a domain, I go into the DNS settings and change the TTL settings to 1 hour (3600 seconds), so that the site will move quickly (and do it overnight – so the new location will show for everyone in the morning)
    (I was expecting this to be mentioned in the article when I saw the title!)

    And to answer Dave’s question you can have as many entries in your Hosts file as you want – I have a reseller account with my hosting company and I’m often working on 2 or more sites I am working on that are located on a different server. You can’t specify a sub-directory in the entry – the one entry will point to all locations for that domain – to do what you want to do you are better using sub-domains – so for example example.com is the main location, then you can have play1.example.com as a sub domains that will have it’s own hosts entry.

  28. David in Mississippi says

    Another article – directly related to this one, but sufficiently different to warrant its own separate article – would be “Replacing A Legacy Website with a Fully-Developed WordPress Website.”

    This has happened to me several times already. I have clients with older, legacy-type (non-WordPress) websites, and they ask me to convert their site to WordPress.

    I have two methods I use to do this, and one of them involves building the brand new WordPress site on a temporary development URL. When it is done, I then need to transfer it to the existing URL for the client.

    In other words, I develop it at DevelopmentSite, and when it is done, I then move it to ExistingLegacySite

    I should think it would be easier to do this than the procedure outlined in your article above, but it would still be helpful for you to do an article on this type of migration.

    Thanks.

  29. Dave says

    Correct me if I’m missing something, but this ‘hosts file change’ will only work if you have a just one site on your plan at that new IP address. I have several low-usage sites I’m hosting on one plan. They are in subdirectories under phulic_html.

    So doing this:
    192.168.1.22 http://www.example.com
    in the hosts file will not specify which of your 5 sites to point to. And it seems the only thing you can specify in the hosts file is an IP address and a URL.
    You can’t do something like this:
    192.168.1.22/sitea http://www.example.com

    Am I wrong?

    • Felipe says

      I think this is correct, it won’t work for shared domains.

      It is better explained here: the voted answer says “If you have shared hosting, this will make your site inaccessible by direct IP. In a shared hosting environment, the host (GoDaddy) will have multiple websites living at the same IP address. When a browser requests a website, the server relies on the domain name to determine which of the many websites to serve. Without a domain name, the server has no way to tell what the browser actually wants so you don’t get your website. To avoid this situation, you will need a host to give you exclusive use of an IP address.”

      I think this should be highlighted in the article.

      • WPBeginner Support says

        Once you have added your domain name to your new host, your webserver knows that it is hosting domain name example.com and it’s root directory (Doesn’t matter if it is also hosting other domains as well). However, DNS servers take time to propagate so instead of sending your request to your new webserver, they will be sending users to old location for a while. The hosts file allows you to send your request directly to the new server. Hope this clears the confusion.

        Administrador

    • Matt Davis says

      Correct me if I’m wrong, but I believe you can type in (directly in the browser’s address bar) the IP address followed by a slash (/) and then the sub-directory of whichever site you’re trying to access. I would avoid changing the hosts file altogether. Most hosting companies I’ve used will also usually assign temporary URLs to each new website as well, so if that’s the case you could use that instead of the IP or messing with the hosts file.

      • Niko says

        That’s correct MATT. Temporary using the IP address instead of altering the hosts file seems like a better approach. However, both work fine.

  30. Tanisia says

    I’ve tried for four hours to make these instructions work. The result? Now I can’t access my site at my old host. I tried following the directions on this 2-year-old article (will there be an update, since BackupBuddy has evolved?) and now everything is messed up.

    I used FTP to upload the files, and edited the host file as instructed, but the ImportBuddy PHP script won’t run. It just shows me the code. I tried contacting Bluehost for assistance, and they were no help. So I tried setting all my other settings back to where they were before I started this odyssey, and now I can’t see my site at all. Not the Admin panel, nothing.

      • Tanisia says

        I’m back in at my old host – my servers needed to re-propagage from Bluehost, and it took longer than I had anticipated. I’m still left with BackupBuddy not working the way it’s supposed to. Again, do you have updated instructions from 2014, since there have been several updates to BackupBuddy since this was written? When I did the Notepad update in Windows 10, it looked different from what was described here, so I couldn’t be sure if that trick worked.

        Thank you for answering back.

  31. Fahim says

    If it was a primary domain , can i follow this Process? I need to move and that domain is Main/primary domain, how can i move,will u plz help me?

  32. Mark says

    Just stuck i step 4, can i just simply addon domain and change dns in new host, ? Following that, C:\Windows\System32\drivers\etc. , there is nothing in my etc, nothing like hosts file, btw great tutorial easy to fallow, thanks

  33. Jacob says

    I was hoping there would be an easier way to do it with a third party service, but I’m not about to shell out 80 bucks just to do that.

  34. Ash says

    The backupbuddy steps in the new version have changed quite a bit. Nothing to be afraid of though. I was able successfully migrate from t1.micro on aws to t2.small instance. So far so good.

  35. David says

    A few questions for you:

    1. Isn’t there a SIMPLE way to back up one site (themes, child themes, plugins, and post data), then restore it to another site?

    It truly should be as simple as (a) Backup To (dropbox mysite.zip), then (b) Restore From (dropbox mysite.zip).

    2. Is it possible, perhaps even EASY, to develop a client’s WP site on your development server, then use Backup Buddy (or some other backup/restore program) to migrate it to the client’s site?

    3. Does Backup Buddy, or any other backup/restore program you know of, give you the ability to restore to an existing WP installation? In other words, can you set it to restore everything except the WP core files?

    Thanks for this article.

    David in Mississippi

    • WPBeginner Support says

      Actually, in the article we have shown how BackupBuddy does exactly what you are asking for. You simply backup your site, download an archive file and an importer file. Upload these files to the new location and run the script. Hope this helps.

      Administrador

    • Ash says

      @David, with backupbuddy you can choose which files to leave out while backing up. So you can leave out the core WP files.

  36. Robert says

    hi guys,

    A friend just make me a new wordpress website and uploaded it to my hosting account. Now, I want to change the domain and hosting account and want to upload the website to the new hosting account.
    My friend sent me the archive with all files of the website including database. How is possible to upload the website to my new host?
    I appreciate your answer.

    thank you

  37. Ricardo Clarke says

    I actually just went through this process yesterday and need to transfer another site today. This is hands down the most thorough walkthrough I’ve seen. The 4 to 48 timeframe really helped ‘cause I thought something went wrong, but the transfer just needed time to propagate across the interwebs.

  38. WPBeginner Staff says

    As soon as you figure out that your new domain has regained the search positions for your old site. We hope that you have setup 301 redireccts on old domain otherwise search engines wouldn’t know that your old content has moved to the new domain permanently.

    • Sebastien says

      Hi there, thanks for your tutorial, here’s an other way of doing it… free.

      1. Tools > export posts and pages from admin panel. If you also need the DB phpMyAdmin export tables from the db. Import them in the new db. Check for the extension of the tables to be the same (_wp for instance)

      2. edit your virtual host config file, add what follows between your server {}

      allow your_public_ip;
      deny all;

      3. Access the site by its ip. (make sure you set the ip of your new server instead of the url in phpmyadmin > wp_options > siteurl and home options)
      4. Tools > import posts and pages
      5. Change your DNS records at the old host.
      6. Done. Use another plugin like UpdraftPlus to backup for free.

  39. Kate_H says

    Great guide. I can confirm these steps work brilliantly as I recently moved a 5 year old WP site from one domain to another domain and swapped web hosts as well.
    The only difference I did was redirect the old site to the new site via the .htaccess as I wasn’t migrating the old domain name over at the time.
    Out of curiosity how long would you leave it before deleting all the old content from the old domain and setting up a permanent URL redirect via your registrar?

  40. zimbrul says

    I really hate Backup Buddy. In 80% of cases I got errors and their support is not that good. I’d rather move a site with Duplicator free WordPress plugin

    • Jim says

      Fully agree. Duplicator has never let me down and I have backed up and installed to many websites to count. No need for a paid plugin.

    • Jonathan says

      I was looking for this. This already assumes knowledge of FTP etc. so why not just:
      1. Copy over all files (download locally, upload to new server).
      2. Export the DB (you can use Migrate DB free version if you can’t access the old hosts phpmyadmin or such). Also, if you’re moving from a different domain it replaces the urls etc.
      3. Create a new DB on your new host, import the DB.
      4. Transfer the domain.

      Same result, no fiddling with installer scripts and such.

      • Matt Davis says

        This is how I would do it.. In addition, you would also need to edit your wp-config.php file with the new DB info (Specifically the database host entry, as I believe importing the old database will create the same database name, user and password on the new one). Also, I would avoid editing your hosts file and instead either use the IP address directly in your browser’s address bar followed by your sub-directory name (if needed) or use the temporary URL most hosters provide when a new account is set up.

        The steps in this article are good for someone that doesn’t want to touch configuration files in their WordPress folders, or who want an all-in-one solution that gets them their site and DB in one step.

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.