server side:
1. create a file or database in your online server.
2. write value in the file/database when you press buttons from your webpage
3. make a script on your server that will read and echo contents of file/database written. common is php script
esp8266 side:
1. use arduino WebClient sample to do http request to your server, pointing to the php script.
2. esp8266 should receive contents of the file
3. parse received content according to your need ie. ON gpio if content is '1'. OFF if '0'.
you can also use ws/mqtt for a more responsive set up.
I'm using HiveMQ for mqtt broker
js client library from Eclipse Paho for my front-end
and PubSubClient library for esp8266