You can use this system if you still have old AMP content after changing the AMP content. With this system, you can update the cache of your AMP pages.
-
Take the project to your computer.
git clone https://github.com/enteresanlikk/amp-cache-update.git
or
You can download the project directly.
-
Import the Private.pem file (RSA). If this file does not exist, the system will not work!
You can visit the link https://developers.google.com/amp/cache/update-cache to create an RSA key.
-
Move the project to the place where you will run it. (Example: htdocs, etc.)
-
Enter the necessary information in the project. You can update information from this file.
$domain = "https://example.com"; //Your domain. $urls = [ "https://example.com/category/example-url/amp", "https://example.com/category/example-1-url/amp", "https://example.com/category/example-2-url/amp" ]; //Links pages to be updated in the AMP cache. Pages must be AMP. This variable must be sent as an array. $pemFileName = "website"; //Your private.pem filename that belongs to your site. If you want, you can write the file with the extension (.pem).
-
Run the project. Just start your Apache server.
-
Go to your project from the browser. For the links you enter, you will be generated AMP cache update links. Go to these links one by one.
-
The AMP cache update link you went to should return the result OK. Otherwise, the problem has occurred, and the page you are going to will have a problem.(Usually private key error.)