<p>I was doing this tutorial <a href="https://cloud.google.com/kubernetes-engine/docs/tutorials/persistent-disk" rel="nofollow noreferrer">https://cloud.google.com/kubernetes-engine/docs/tutorials/persistent-disk</a> where they created a PersistentVolumeClaims for wordpress other than that of the database. I don't understand why? Is there data in wordpress that doesn't get saved in the database?</p>

marwa karaki
<p>Wordpress uses mysql to store a lot of information but not all the information that is needed, for example, some cache files, static files like images and the wp-config.php are files that need to be stored as files and persist in case you need them after a pod recreation to persist the status of your application.</p>

<p>On the other hand, mysql is an application/service by itself with the same storage requirement to work, the data folder of mysql is the most obvious information you need to persist.</p>

<p>With that said the persistent volumes (PVC) cannot be mounted twice, for example on mount point in the wordpress pod and another one in the mysql pod using the same PVC you can reed more about PVC in the docs.</p>

<p><a href="https://kubernetes.io/docs/concepts/storage/persistent-volumes/" rel="nofollow noreferrer">https://kubernetes.io/docs/concepts/storage/persistent-volumes/</a></p>
