MCP23S17 SPI Port Expander
You can easily add more GPIO connections for an ESP8266 using a port expander. This example demonstrates how to do that with a common SPI port expander.
These devices are perhaps a little less common than their I2C equivalents, see MCP23017 I2C Port Expander.
References
SoC support
esp8266