I recently was working on a chatbot for a website and wound up using a great PHP library for the task, BotMan. With BotMan, you can follow the really well-done documentation to set up a BotMan endpoint. This is where any client would call to send requests and where logic would be placed to respond to the request. Once it is up and running, you can interface with the BotMan endpoint with something like Postman or Paw. Of course, for your site, you will want some kind of web interface that can send messages to and display responses from BotMan.
The only setting that you will need to have correctly set for the widget to work is the Chat Server which will be the URL of the BotMan endpoint. You can download the plugin at GitHub:
If you see any problems please let me know.