Enviado em 20/05/2021 - 19:15h
Eu primeiro exportei o xml de um site Wordpress e depois fiz um script para importar no outro site. Ocorre que esse script faz uma série de ações em sequencia. Talvez isso desgaste o servidor por estar o tempo todo trabalhando. Alguém sabe como pausar por um minuto após o processamento de cada xml fatiado? Isso ajuda o servidor ou não faz diferença? Segue os comandos que utilizei abaixo.
wp export --dir=/var/www/site.com.br/htdocs/backup --user=carlos --skip_comments --post_status=publish --filename_format={site}.{date}.{n}.xml --post_type=post --max_file_size=5 --start_date=2020-03-01 --end_date=2021-05-20 --allow-root
#!/bin/bash
wp import site.2021-05-20.000.xml --authors=create --allow-root
wp import site.2021-05-20.001.xml --authors=create --allow-root
wp import site.2021-05-20.002.xml --authors=create --allow-root
wp import site.2021-05-20.003.xml --authors=create --allow-root
wp import site.2021-05-20.004.xml --authors=create --allow-root
wp import site.2021-05-20.005.xml --authors=create --allow-root
wp import site.2021-05-20.006.xml --authors=create --allow-root
wp import site.2021-05-20.007.xml --authors=create --allow-root
wp import site.2021-05-20.008.xml --authors=create --allow-root
wp import site.2021-05-20.009.xml --authors=create --allow-root
wp import site.2021-05-20.010.xml --authors=create --allow-root
wp import site.2021-05-20.011.xml --authors=create --allow-root
wp import site.2021-05-20.012.xml --authors=create --allow-root
wp import site.2021-05-20.013.xml --authors=create --allow-root
wp import site.2021-05-20.014.xml --authors=create --allow-root
wp import site.2021-05-20.015.xml --authors=create --allow-root
wp import site.2021-05-20.016.xml --authors=create --allow-root
wp import site.2021-05-20.017.xml --authors=create --allow-root
wp import site.2021-05-20.018.xml --authors=create --allow-root
wp import site.2021-05-20.019.xml --authors=create --allow-root
wp import site.2021-05-20.020.xml --authors=create --allow-root
wp import site.2021-05-20.021.xml --authors=create --allow-root
wo clean --fastcgi
clear
wo clean --fastcgilimpa o cache se o servidor foi criado com o wordops (www.wordops.net)
Atualizando o Passado: Linux no Lenovo G460 em 2025
aaPanel - Um Painel de Hospedagem Gratuito e Poderoso
O macete do Warsaw no Linux Mint e cia
Visualizar arquivos em formato markdown (ex.: README.md) pelo terminal
Dando - teoricamente - um gás no Gnome-Shell do Arch Linux
Como instalar o Google Cloud CLI no Ubuntu/Debian
Mantenha seu Sistema Leve e Rápido com a Limpeza do APT!
Procurando vídeos de YouTube pelo terminal e assistindo via mpv (2025)
Olha que maravilha, Arch no C2D 7400, 2GB de RAM, vídeo onboard e no G... (0)
Jogos baixados na Central de Aplicativos mas que não abrem (1)
debian com wayland, configuracao de teclado. Mudou Tudo! [RESOLVIDO] (1)