How to redeploy¶
This guide provides the necessary steps for migrating an existing WordPress instance to a new charm instance.
Migrate database¶
Follow the instructions in the MySQL charm migration guide to migrate the content of the WordPress MySQL database.
Migrate media files¶
Media files stored in Kubernetes storage¶
If your media files are stored in Kubernetes
storage (wp_plugin_openstack-objectstorage_config is not configured), use the
following steps to migrate your files:
Use the
juju scpcommand to transfer files from the/var/www/html/wp-content/uploadsdirectory of the oldwordpresscontainer to a local directory.Use the
juju scpcommand again to copy these files from the local directory to the/var/www/html/wp-content/uploadsdirectory in the new WordPress charm instance’swordpresscontainer.
Media files stored in object storage¶
If your media files are stored in object storage and
the wp_plugin_openstack-objectstorage_config is not configured, you have two
options:
Provide the new WordPress charm instance with the same credentials and connection information for the object storage. This allows the new instance to automatically access the existing files.
Use tools like rclone to copy files from the old storage bucket to a new bucket for the new deployment.