Connect Arduino Nano(CLONE) to WiFi using ESP8266 ES-01.

I want to control 8 relays with Nano, can esp8266 do that?