Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

Blindacme's avatar

Digital Ocean + Forge = WordPress not sending contact forms

I can't seem to figure it out and this may be beyond my expertise but every site I have set up through Forge and Digital Ocean using WordPress is having issues with submitting forms. I thought it was themes or plugins but I have since narrowed it down to server(s). Looking in the console I see that admin-ajax.php never connects and returns a 504 timeout error; I don't know much about server configurations but I can't find much online about it. The forms do eventually send the emails on some sites but you cant tell from the front end of the site because it just keeps spinning and never looks like it submits. Anyone know what I can do to check for solutions?

0 likes
6 replies
richard@gorbutt.com's avatar

I've always added a Wordpress SMTP plugin and used an SMTP server (mostly mailgun) to send stuff my Forge Wordpress installs.

Can't recall if I found that postmail or whatever was never installed and ended up bypassing it. If it was, then default mail always ended up in the spam folders anyway.

IsaacBen's avatar

Not sure if this is the problem, but forge doesn't install postfix, which would be necessary for working with PHP mailer.

You have to use an SMTP plugin like was mentioned above and use a service like mailgun/sendgrid.

zamson's avatar

Had this problem the other day. Like previous posters said; make sure your WordPress install in able to send emails or the form submission will fail. In my case it was Gravity Forms.

Please or to participate in this conversation.