wordpress-core
wordpress-core copied to clipboard
Updating delete all WP files
Hi I use your wp-core package in composer with other packagist plugins to update WP via composer. Today If I do an usual composer update it states: "Upgrading johnpbloch/wordpress-core (6.4.3 => 6.5.0)" After that my wp site is like reinstalled all themes files and plugins are erased Please assist
You might want to use a higher level abstraction, like https://github.com/wecodemore/wpstarter/
@GioPetry checkout this package https://github.com/drupal-composer/preserve-paths. You can prevent deletions by adding something like
"preserve-paths": [
"web/wp-content/themes/custom-theme",
"web/wp-content/plugins/custom-plugin"
],
@GioPetry checkout this package https://github.com/drupal-composer/preserve-paths. You can prevent deletions by adding something like
"preserve-paths": [ "web/wp-content/themes/custom-theme", "web/wp-content/plugins/custom-plugin" ],
@mralexho this can be a good quick solution BUT does it work for files too? at least the wp-config need to be saved...
@GioPetry yes it works for individual files. Did you see their example? Add the following to your composer file
"preserve-paths": [
"web/wp-config.php",
"web/wp-content/themes/custom-theme",
"web/wp-content/plugins/custom-plugin"
],
@GioPetry yes it works for individual files. Did you see their example? Add the following to your composer file
"preserve-paths": [ "web/wp-config.php", "web/wp-content/themes/custom-theme", "web/wp-content/plugins/custom-plugin" ],
Thanks but it seems to conflict with the installer see below the message I get. Also I use wpackagist to install and update plugin and themes. Files of installed package were overwritten with preserved path /home/staging/htdocs/mysite/wp-content/themes! Files of installed package were overwritten with preserved path /home/staging/htdocs/mysite/wp-content/plugins!
At the moment the easiest way to work around is is to remove this wp core and installer and use composer just for plugins and themes