↓ Ir para o conteúdo principal

← todas as notas

📎 Webclip

Complete Guide To Hosting Wordpress On Heroku With SSL Certification

The guide says a self-hosted WordPress site can run on Heroku at no monthly cost, aside from annual domain fees. It warns about a 5MB database limit, the need to update WordPress through Composer, and the need to add themes and plugins manually before pushing changes.

Reading notes
#

  • Create a Heroku account, choose PHP, and add a credit card so WordPress can be installed and the free dyno hours can increase.
  • Use Philipp Heuer’s wordpress-heroku repository and the Deploy to Heroku button as the base setup.
  • Clone the Heroku app repo locally, merge in wordpress-heroku, then commit and push.
  • Set up Cloudflare, change nameservers at the registrar, and wait for propagation.
  • Optionally add Cloudflare page rules for HTTPS, www redirection, and caching.
  • Add the custom domain in Heroku without www or https, then copy the DNS target into Cloudflare.
  • Update WordPress by changing the johnpbloch/wordpress version in composer.json and running composer update.
  • Add or remove plugins and themes inside /web/app, then unzip them into the Theme and Plugin folders before pushing.
  • Use Cloudflare Flexible SSL if login or HTTPS problems appear, and replace http with https in config/application.php when needed.
  • Manage the database with MySQL Workbench or WP Optimize, especially to keep the database size under control.
  • Use WP Offload Media Lite and AWS S3 for uploads, since pushing code overwrites the uploads folder.
  • For debugging, use the Heroku app URL instead of the custom domain, and check config/application.php rather than wp-config.
  • Disable redis-cache if it causes problems by removing its lines from composer.json and its mu-plugin file.
  • Keep the app awake on the free plan by scheduling a Cron-job.org request every 30 minutes.