Open a terminal. CtrlAltT.
apt-get install --reinstall hplip
Select the USB option from the list, and follow the prompts.
It will then ask about a propriatry plugin, let it download this , agree to the license then follow the rest of the prompts.
You left everything to default m for name of print queue, say y for the selected PPD being correct, put location to Home, and left additional information blank, then y to print a test page.
The printer should now work over USB.
Check the test page looks correct.
On the left side of the printer is a WiFi button, press it and it will create an Ad-Hoc WiFi network which you can connect to.
Connect to this using a suitable device, it will need a WiFi connection, either use your Gnu/Linux machine directly.
Once connected, find the IP Address of the printer by holding the red X button on the printer, which will make it print out a configuration sheet containing the IP Address.
Connect using a web browser to this IP address, and within the Network Settings, configure the connection to your actual WiFI network.
Check and double-check the settings are correct, then once saving the settings, it should try to connect to your WiFi network.
On your Gnu/Linux machine, remove the USB version of the printer within the System ---Administration---Printing menu, then run this command to run setup again:
Select the Network option from the list, have it download the plugin and accept the license again if asked, fill in the same prompts as above, and you should be ready to print over wireless.