This was a hard post to come up with a title for, but this is a little tip for anyone who uses the Bitnami WordPress Docker container and has had to delete their image, or has needed to reinstall Docker and found their Bitnami WordPress install is now broken. In this case it just shows the default ‘It Works!’ Apache page.
If this happens all you need to do is rename the folder where your Docker container persists your WordPress to. Once renamed ‘down’ your container, if not already done, then ‘up’ it again. This will force your container to reinitialize WordPress again because of the missing files. Once done, delete the new folder it created and rename your old folder back to the correct name. This should fix everything.
Why Does This Work?
Bitnami only places the
wp-content folder into your persisted folder. The core WordPress files are kept inside the container. If the container sees a existing WordPress install it will not install the core WordPress files, but since you have deleted the image or reinstalled Docker those files are still missing. Renaming the persisted WordPress folder forces it to reinitialise which grabs the core WordPress files again.
Hopefully this might be helpful to anyone experiencing this issue. In this case it was for a family member who uses a cloned version of their website in a Docker container for certain changes and they accidentally uninstalled Docker.