How to turn off calls, iMessage and texts, but stay on Wifi?
Put your phone in Airplane mode, then turn on Wifi. This disables the cell network, but enables wifi. 

Messages will continue to work, but phone calls will not. If you have Wifi calling enabled, phone calls will continue to get through, depending on your service provider.

To disable Messages, simply go to the Messages section of Settings, and move the slider to the left.