When restoring from a Vagrant environment to a Docker environment, errors or warnings may occur depending on the PHP version. This section describes a solution to this problem.
Older versions of WordPress (hereafter referred to as WP) and plugins may cause compatibility issues with newer versions of PHP, resulting in errors and warnings. To resolve this, you will need to update WP and plugins to the latest versions.
Here is the command to update WP and the plugin (in this case wp-super-cache) using Docker
docker run -it --rm
--volumes-from your_wordpress_1
--network container:your_wordpress_1
wordpress:cli wp core update
The above command updates the WP core. Next, the command to update plugins is as follows
docker run -it --rm
--volumes-from your_wordpress_1
--network container:your_wordpress_1
wordpress:cli wp plugin update wp-super-cache
These commands will keep your WP and plugin versions up-to-date and eliminate errors and warnings caused by PHP versions.