WordPress Email Not Working After Server Transfer

I recently ran into a troubling issue after transferring a WordPress site to another server. The website was transferred from a proprietary hosting control panel to cPanel on HostGator. The contact form stopped working completely giving the below error message.

Failed to send your message. Please try later or contact the administrator by another method.

I tried a bunch of different solutions that I found in articles all over the internet. I tried solutions from forums, websites, and even the Contact Form 7 support documentation. I made sure the “from” email was on the same domain, edited the database file, reinstalled the plugin, tried the default form, nothing was working.

The solution was extremely EASY and FAST! What finally solved my issue was the following:

In cPanel under the advanced section, go to PHP configuration.


Click the setup custom php.ini button.


Scroll to the bottom of the page and apply.


Try your contact form.

It appears the PHP.ini is what’s causing the issue.


I hope this helps someone save tons of time looking for the issue. Be sure to comment and let me know if this helps!