Recentemente, um de nossos leitores nos perguntou como mesclar dois sites do WordPress? Às vezes, você pode criar vários sites do WordPress, mas depois deseja mesclá-los. O WordPress vem com ferramentas internas para fazer isso facilmente. Neste artigo, mostraremos a você como mesclar corretamente dois sites do WordPress.
Por que mesclar dois sites do WordPress?
Pode haver vários motivos para mesclar dois ou mais sites WordPress. Talvez você queira iniciar um novo blog do WordPress combinando seus blogs antigos para ter todo o conteúdo em um único local.
Outro motivo pode ser que um dos seus blogs não esteja indo muito bem e você queira mesclar o conteúdo dele com um dos seus blogs principais.
A maioria dos usuários mescla sites do WordPress para gastar menos tempo com a manutenção de uma instalação separada do WordPress. Em vez de executar, comercializar, atualizar e manter backups do WordPress de dois ou mais sites, você pode se concentrar na manutenção e no crescimento de apenas um site WordPress.
Vamos dar uma olhada em como mesclar facilmente sites do WordPress.
Exportação de conteúdo do site antigo do WordPress
Para fins deste exemplo, digamos que você tenha um site WordPress em http://oldsite.com e queira mesclá-lo com http://newsite.com/.
Importante: Não se esqueça de criar um backup completo do WordPress de ambos os sites. Isso será útil caso algo dê errado e você queira reverter.
Primeiro, você precisa acessar a página Ferramentas ” Exportar na área de administração do seu site antigo do WordPress. Esse é o site que você deseja mesclar com o site mais novo.
Certifique-se de selecionar a opção “All content” (Todo o conteúdo) e, em seguida, clique no botão “Download Export File” (Baixar arquivo de exportação) para continuar.
O WordPress agora preparará um arquivo XML e o enviará ao seu navegador. Você precisa salvar esse arquivo em seu computador, pois precisará dele na próxima etapa.
Esse arquivo conterá o seguinte:
- Todos os seus posts e páginas do WordPress
- Todos os tipos de post personalizados (se você tiver algum)
- Todas as categorias, tags e taxonomias personal izadas (se houver).
Mesclagem de conteúdo no novo site WordPress
Agora que você exportou o conteúdo do site antigo, é hora de mesclá-lo com o novo site do WordPress.
Vá para a área de administração do site de destino (o site em que você deseja mesclar o conteúdo) e acesse a página Ferramentas ” Importar.
Essa página lista todas as ferramentas de importação que você pode instalar e executar em seu site do WordPress. Role para baixo até a parte inferior e clique no link “Install now” (Instalar agora) em WordPress.
Depois que o importador do WordPress estiver instalado, você precisará clicar no link “Run Importer” (Executar importador) para continuar.
Em seguida, você será solicitado a carregar o arquivo de exportação do WordPress.
Você precisa clicar no botão “Choose File” (Escolher arquivo) e selecionar o arquivo XML que você baixou anteriormente.
Clique no botão “Upload file and import” (Carregar arquivo e importar) para continuar.
O WordPress carregará seu arquivo de exportação e o analisará. Depois disso, ele o redirecionará para a página de configurações de importação.
Ele solicitará que você atribua autores ou crie novos autores.
Você pode atribuir o conteúdo importado a um usuário existente em seu site WordPress ou criar um novo autor.
Em seguida, marque a caixa na opção “Import Attachments” (Importar anexos) para importar anexos de mídia do seu antigo site do WordPress.
Agora você pode clicar no botão Submit (Enviar) para executar a etapa final da importação.
O WordPress importará o conteúdo do seu arquivo de exportação e o adicionará ao seu novo site do WordPress. Quando terminar, você verá uma mensagem de sucesso.
Configuração de redirecionamentos
Depois de mesclar com êxito o conteúdo de dois sites do WordPress, a próxima etapa é configurar os redirecionamentos para que os usuários que visitam o site antigo sejam automaticamente redirecionados para o novo site do WordPress.
Você precisará editar o arquivo .htaccess no site antigo do WordPress.
Você pode editar o arquivo .htaccess conectando-se ao seu site WordPress usando um cliente FTP ou usando a ferramenta Gerenciador de arquivos no cPanel da sua hospedagem WordPress.
O arquivo .htaccess está localizado na pasta raiz de seu site. Se não conseguir encontrá-lo, consulte nosso guia sobre por que você não consegue encontrar o arquivo .htaccess em seu site WordPress para exibi-lo.
Você precisa colocar esse código na parte superior do seu arquivo .htaccess.
#Options +FollowSymLinks RewriteEngine on RewriteRule ^(.*)$ http://www.newsite.com/$1 [R=301,L]
Não se esqueça de substituir newsite.com pelo nome de domínio de seu novo site WordPress. Salve as alterações e faça o upload do arquivo de volta para o servidor.
Agora você pode visitar qualquer postagem em seu antigo site do WordPress e será automaticamente redirecionado para a mesma postagem no novo site.
Solução de problemas após a fusão de dois sites WordPress
Como mesclar e editar em massa categorias e tags?
Talvez você queira limpar as categorias e as tags após mesclar dois sites do WordPress. Para obter instruções detalhadas, confira nosso tutorial sobre como mesclar e editar em massa categorias e tags no WordPress.
Como importar imagens ausentes?
Para isso, você terá que desativar temporariamente o redirecionamento editando o arquivo .htaccess e removendo o código que adicionou anteriormente. Depois disso, você pode seguir as instruções em nosso guia sobre como importar imagens externas no WordPress.
Não se esqueça de configurar os redirecionamentos novamente depois de importar suas imagens.
Corrigir URLs que apontam para o domínio antigo em posts e páginas
Todos os links internos em posts e páginas importados ainda estarão apontando para o seu site antigo. Como você configurou os redirecionamentos, os usuários ainda chegarão ao post correto no novo site.
No entanto, ainda é necessário atualizar os URLs para aprimorar o SEO e melhorar a experiência do usuário. Para obter instruções passo a passo, consulte nosso tutorial sobre como atualizar URLs ao mover seu site WordPress.
Esperamos que este artigo tenha ajudado você a mesclar dois sites WordPress. Talvez você também queira ver nosso guia passo a passo de SEO para WordPress para iniciantes.
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.
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!
Melody says
Would this be the same as copying the posts and products to the new website?
WPBeginner Support says
Similar, this would also tell search engines to go to the new post on your site instead of the old post on the old sites
Administrador
micibama says
Thanks for sharing this important guide. I have followed the guide accordingly however, my old site contents are not showing on my new site. They are saying page not found. Do i need to replace all the codes in the .htaccess with the one given above? Please help
WPBeginner Support says
You shouldn’t need to replace your entire htaccess unless you have code that would conflict with our recommendation. You would likely want to resave your permalinks to help with the most likely reasons.
Administrador
Keval Padia says
Excellent content. We used to maintain two separate blogs for individual niche and were looking to merge both together without hampering our SEO. These steps are detailed and easy to follow, thanks for writing!!
WPBeginner Support says
You’re welcome, glad our guide was helpful
Administrador
Monique Martens says
Hi there,
Thanks for this interesting and helpful guide!
Can you tel us what will happen with pages and posts that have the same name and/or ID number? For example, each website has a home, blog and contact page. Will these be separate pages with the same name?
Best regards,
Monique
WPBeginner Support says
The posts will have the same name but the slug will be modified to be unique unless they are an exact copy of what you have currently on your site.
Administrador
Keir Briscoe says
I get a 405 error when I try to import. I am the creator and admin for both sites. I am also logged into both sites. I doubt anyone will reply to this message. but though I would leave it anyway
Romona says
Hello,
If I have a new theme at my new site and new host, where will the pages go and will they automatically adjust to the new theme? By pages I mean (diy, recipes, life, etc). Will I need those exact page headings for it to fall into the correct category or will they all fall together into one category?
THANK YOU for your help!
Paul says
Hello,
Very good article! Exactly what I was looking for in terms of merging two WordPress sites. I was curious though if this could be applied on sites with WooCommerce for example?
Thank you for this well written procedure.
Steve says
I have oldsite.org which has a blog in the root and 2 more blogs at /nytips/ and /nynews/ and a community at /nyforum/ and want to make /nytips/ and /nynews/ a category of the blog in the root so the search box will work for the entire site plus giving me the chance to maintain one blog and one forum. Will this article help or will I have to use oldsite.net first then move it back to oldsite.org?
Each folder was a domain which I consolidated 5+ years as I did not want to buy SSL certs for each domain and their aliases.
Edmond Chan says
Hi team, thanks very much for this info. I edited my .htaaccess file in my old wordpress site to redirect to the new site. I used the code in the article above. However, I’m not able to access oldsite.com/wp-admin anymore as it redirects to newsite.com/wp-admin! Is there anyway to still access the old site’s admin dashboard to update plugins, wordpress itself or for any other reasons? Many thanks, Ed
WPBeginner Support says
Hi Edmond,
You will need to remove the .htaccess redirect to access old site admin area.
Administrador
Edmond Chan says
Hi Team,
Thanks very much for your reply. The problem is that because the old site admin area immediately redirects to the new site’s admin area, I literally can’t access the old site’s .htaccess file in order to edit/remove the redirect. It’s chicken and egg! Is there any way to fix this?? Many thanks, Ed
WPBeginner Support says
Hi Edmond,
You can use FTP to edit .htaccess file.
ranga says
Hi!
We moved our content from siteA to siteB both of which use wordpress CMS. After merging the content do we need to change the address in google websmaster tools.? Thanks.
Ilyas says
I have merged my websites and all of the posts are on my new website.
But When I search an article, still the url and name of my old website my old website appear on the search engine.
What if I delete my old website or if it expires?
Alan says
The best thing is to set redirects up from your old website to your new website and never let it expire.
John says
Thanks for an interesting and useful article.
I am in process of merging three websites with my older and larger main site. I’ve been doing this manually and it’s taking ages. I didn’t realise it was possible to do it automatically. HOWEVER, one issue I’m facing doesn’t seem to be covered in your article. If I choose “all content” when I export from one site, will that include the comments the posts have attracted? If not, how to export/import comments?
Many thanks,
John
WPBeginner Support says
Hi John,
Yes, comments will included in the export file.
Administrador
Jack says
Would it be ok to redirect single blog posts one by one over a time periode of one year.
E.g. Every week two blog posts from one blog (the one fizzling out) are republished to the main focus blog. And 2 redirects are done every week for a year.
This process goes on until all are moved to main blog (say 100 posts over a year). Would that be a bad idea in teems of SEO?
Chris says
Hi Folks,
With a merge, what’s the situation about page/post IDs? If we are dealing with bigish sites surely there is a chance the page ID will be duplicated on import? Will that cause problems, and if so how to avoid/fix it?
Cheers,
Chris
Jack says
Would it be ok to redirect single blog posts one by one over a time periode of one year.
E.g. Every week two blog posts from one blog (the one fizzling out) are republished to the main focus blog. And 2 redirects are done every week for a year.
This process goes on until all are moved to main blog (say 100 posts over a year). Would that be a bad idea in teems of SEO?
Gemma says
Hi,
I’m curious to know, when importing the OLD site into the NEW, will it adopt the theme settings of the NEW site automatically?
How can I make sure they match?
Thanks
Melissa says
How long before you could delete the original WP site?
WPBeginner Support says
Once you are satisfied that the old site is no longer getting any traffic, you can delete it. However, if the original site is still getting significant traffic from sources other than search engines, then you may want to keep the domain up as long as possible.
Administrador
Karakaplan says
How long should keep Redirect htaccess file in old server?
Alan says
I’d like to import one websites posts into a particular category or custom post type. Then a different redirect will be needed. Can you make a tutorial fo that?
Valentine says
Thanks for this information. I’ve successfully merged my two sites and they are working properly from one dashboard. Nice Job
WPBeginner Support says
Glad you found it helpful don’t forget to follow us on Facebook for more WordPress tips and tutorials.
Administrador
Georgina Moon says
This is interesting and helpful. But I have the opposite question – I want to start a new WordPress blog, and export only certain posts to the new blog (e.g., all my posts with certain tags or categories, such as Greece, sailing etc). I have laboriously been copying and pasting, but I have to add the photos again, plus tags and categories. Is there a quicker way, please?
WPBeginner Support says
Hi Georgina,
Yes, you can do this here is how.
First create a new category in WordPress, you can all it anything you want.
Next, you need to go to Posts -> All Posts screen. Click on screen options button at the top right corner. Under ‘Number of items to show per page’ enter a number larger than total number of posts on your site then click on Apply button.
WordPress will now load all your posts on the same page. Check the box next to the posts you want to move. Then select ‘Edit’ from ‘Bulk Options’ drop down menu and click on the Apply button.
A box will appear with a number of options. Simply select the category you created earlier to file all selected posts under that category. Click on update button to save your changes.
Now you can go to Tools -> Export page. Select posts and then under export settings select the category that has all the posts you want to move.
Administrador