As a result of the PageSpeed insight measurement, the site was found to be too slow, so I tried to speed up the loading speed by looking for various methods, and among them, the cache plugin was the first to install. However, I got an error saying that the WordPress WP CACHE definition was not added.
Since I’m using Amazon Lite Sale, to fix this error, open wp-config.php with the VI editor in SSH and define(‘WP_CACHE’, TRUE); Added.
But after I added it, WordPress couldn’t connect, so I spent several hours searching overseas communities and trying to recover.
<Plugin list drop-ins error>
Eventually, I tried to restore by linking the snapshots I made a few days ago, but I gave up on fixing the error because I thought it might not work again.
But recently, while maintaining WordPress, I tried again, but it was successful, so I am going to summarize the method I did for those who are not familiar with programming like me and are looking for it.
Since I am using Amazon Light Sale, I will explain it based on that basis.
1. Create a snapshot
If you go into the Amazon Light Sale and go to the Light Sale from the top service, you will see the instance you are using, and if you click on it, you will see the snapshot shown above.
This is a backup, and when something goes wrong with WordPress, you can take a snapshot and restore it. When you click Create Snapshot, the backup process proceeds, which may take a few tens of minutes depending on the saved capacity.
If you have a problem with WordPress while adding the WordPress WP CACHE definition, you can view the post I wrote earlier and create an instance of the snapshot that I created and connect it.
2. Disable cache plugin
In order to add the WP_CACHE definition to wp-config.php, if the cache plugin is installed, you must first disable it.
3. Add wp-config
If you have taken a snapshot and backed it up, go to Connect from the top menu and click <Connect using SSH>.
If you are connected to the terminal through SSH, enter sudo nano /opt/bitnami/apps/wordpress/htdocs/wp-config.php and the wp-config.php file will be opened with the nano editor.
If you have opened wp-config.php with an editor, define(‘WP_CACHE’, TRUE); just below <?php at the top of the page. Add and press the shortcut Ctrl+O to save.
4. WordPress WP CACHE Results
After the above process is over, go back to Drop-ins from the plugin list and you can see that the WordPress WP CACHE error has been resolved. This method was reported as the content of the overseas community, and when I saw other articles, I could see the complex part where I had to do things like empowerment.
So, even if you do this, it may not work. If you are using a light sale like me, please do the above process while backing up by creating a snapshot.