Complete restore can leave the site half-restored

Abierto
#247 0 comentarios 0 reacciones 0 asignados Ver en GitHub

@rafaelmaeuer ya está trabajando en esto.

Desde el 29/10/2026.

  • #251 de @rafaelmaeuer — abierto

Evaluación

Dificultad
4/5
Tiempo estimado
3-5 días
Aptitud para principiantes
20/100
Tipo de issue
Error
Claridad
Bien especificado
Estado de actividad
Estancado
Stack tecnológico
php, wordpress
Área
backend, devtools

Línea de trabajo

The issue describes restore behavior in the file-copy and EventSource request paths, but names no source files or tests. Read the restore implementation and inspect the open pull request #251 to understand the proposed fix. Done means the running BackWPup version remains in place and the copy finishes after the browser leaves the page.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

Describe the bug
Two ways a complete restore leaves a mix of old and restored files:

  1. The backup's BackWPup replaces the running plugin. The file step copies wp-content/plugins/backwpup from the backup over the plugin running the restore. The database step and the cleanup then run the backup's (often older) code, so fixes in the installed version are not used.
  2. Leaving the restore page aborts the copy. The file copy runs in one EventSource request without ignore_user_abort. Following a link, closing the tab or dismissing an admin notice via its link makes PHP abort the copy halfway.

To Reproduce

  1. Install a newer BackWPup than the one in the backup and start a complete restore. After the file step, wp-content/plugins/backwpup/backwpup.php has the backup's version.
  2. On a site with All-In-One WP Security's firewall (loaded via auto_prepend_file), restore a backup containing a different AIOS version and leave the page while "Restoring: Directories" is running.

Observed
For case 2, the restore log stops mid-way and every request, including / and the restore page, fails with:

PHP Fatal error: Trait "AIOWPS\Firewall\File_Prefix_Trait" not found

AIOS' new config.php was copied, but the libs/traits/ folder it needs was still queued. The restore can't be resumed from the browser.

Expected behavior
The restore keeps the running BackWPup plugin and finishes the copy even if the browser leaves the page.

System

  • BackWPup 5.7.8 (restore code shared with 4.x)
  • PHP 8.3, MariaDB, All-In-One WP Security with firewall enabled

A fix is ready as a pull request.

Lenguaje dominante
PHP
Estrellas
96
Forks
48
Métricas de merge de PR
Sin PR fusionados en 30 d

Preparar el entorno

Este proyecto no incluye contenedor de desarrollo, Dockerfile ni guía de contribución, así que la configuración corre por tu cuenta: empieza por su README y consulta nuestra guía para la primera contribución para los pasos generales.

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de wp-media/backwpup

Todos los issues de wp-media/backwpup

Issues similares

Más issues de PHP

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.