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)
Kernel turbinado e GNOME 49 dominam o giro do dia no mundo Linux
Novidades Linux: Kernel 6.17, distros em ebulição e segurança em foco
Kernel ganha novos linters Rust e distros avançam com recursos de IA
Firewire resiste, Bcachefs sai: destaques Linux do dia
Kernel 6.18 em foco, betas fervilhando e avanços em IA no Linux
Adicionando o repositório backports no Debian 13 Trixie
Como definir um IP estático no Linux Debian
systemd-resol... precisa ser reiniciado periodicamente (5)
Alguém que utilize o Warsaw do BB no Ubuntu 24.04 [RESOLVIDO] (6)
Fedora não reconhece James Donkey 102 Wireless Gaming Mouse (2)