---
title: Charmhub | Deploy WordPress using Charmhub - The Open Operator Collection
description: Deploy the latest version of WordPress as a Kubernetes Operator on any
  cloud.
url: https://charmhub.io/wordpress-k8s/docs/redeploy
---

# WordPress

[Canonical IS DevOps](https://charmhub.io/publisher/canonical-is-devops "View all packages from Canonical IS DevOps")

* [Canonical IS DevOps](https://charmhub.io/publisher/canonical-is-devops "View all packages from Canonical IS DevOps")

Platform:

stable 15

```
juju deploy wordpress-k8s
```

[Learn to deploy on juju >](https://juju.is/docs/juju/manage-applications)

---

#### Contacts

##### Maintainers

+ [Launchpad Team](https://launchpad.net/~canonical-is-devops)

* [Submit a bug](https://github.com/canonical/wordpress-k8s-operator/issues)

---

Share your thoughts on this charm with the community on discourse.

[Join the discussion](https://discourse.charmhub.io/)

# How to redeploy

This guide provides the necessary steps for migrating an existing WordPress
instance to a new charm instance.

## [Migrate database](https://charmhub.io/wordpress-k8s/docs/redeploy#p-36499-migrate-database)

Follow the instructions
in [the MySQL charm migration guide](https://canonical-charmed-mysql.readthedocs-hosted.com/how-to/back-up-and-restore/migrate-a-cluster/)
to migrate the content of the WordPress MySQL database.

## [Migrate media files](https://charmhub.io/wordpress-k8s/docs/redeploy#p-36499-migrate-media-files)

### [Media files stored in Kubernetes storage](https://charmhub.io/wordpress-k8s/docs/redeploy#p-36499-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:

1. Use the `juju scp` command to transfer files from
   the `/var/www/html/wp-content/uploads` directory of the old `wordpress`
   container to a local directory.
2. Use the `juju scp` command again to copy these files from the local
   directory to the `/var/www/html/wp-content/uploads` directory in the new
   WordPress charm instance’s `wordpress` container.

### [Media files stored in object storage](https://charmhub.io/wordpress-k8s/docs/redeploy#p-36499-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:

1. 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.
2. Use tools like [rclone](https://rclone.org) to copy files from the old
   storage bucket to a new bucket for the new deployment.

---
