Tag Archives: wordpress

Connecting external domain to WordPress

Why do we do this? so we can host the blog at blog.siddjain.com instead of sidshome.wordpress.com The setting to do this is in Upgrades -> Domains Tip: do NOT use https://wordpress.com/domains/manage. You won’t be able to connect a domain on … Continue reading

Posted in Computers, programming, Software | Tagged | Leave a comment

Where are the Logs?

TL;DR: When running WordPress inside a container based on the wordpress:php7.4-fpm-alpine image, docker logs will only show you the system logs. Your own log messages i.e., the messages you output in your application using the error_log function will appear in … Continue reading

Posted in Software | Tagged | Leave a comment

How to debug WordPress PHP code running inside a Docker container from VS Code

Preface: The steps here worked for me on Mac. You may run into issues with Windows if you are using WSL2. This article describes the steps you need to do to debug WordPress PHP code that is running inside a … Continue reading

Posted in Software | Tagged | Leave a comment

Understanding the internals of wordpress php-fpm-alpine image

This post describes the internals of wordpress:php7.4-fpm-alpine Docker image. The source code of this image can be found here. The wordpress container does nothing but run the following command and wait for it to end which it never does as … Continue reading

Posted in Software | Tagged | Leave a comment

Debugging File Upload Issues with WordPress

First make sure you have adequately increased the maximum file size that can be uploaded to wordpress. It is possible that uploads may still not work. On php-fpm-alpine image (and even on apache) wordpress runs under the credentials of www-data … Continue reading

Posted in Software | Tagged | Leave a comment

How to change the maximum file size you can upload to wordpress on nginx w/ php-fpm

Apache is a solid web server but my goto environment for wordpress has now changed to running it on Docker with NGINX + php7.4-fpm-alpine. To change the max file size you can upload to wordpress, you will need to make … Continue reading

Posted in Software | Tagged | Leave a comment

CloudFlare 522 Error. Server does not respond.

This is probably the longest time I have spent on debugging something (4 days) so its worth the effort to write about it. The problem: We built a wordpress site but got CloudFlare 522 error when trying to connect to … Continue reading

Posted in Software | Tagged | Leave a comment

A note on the dbDelta function

The dbDelta function documented at https://codex.wordpress.org/Creating_Tables_with_Plugins: The dbDelta function examines the current table structure, compares it to the desired table structure, and either adds or modifies the table as necessary, so it can be very handy for updates (see wp-admin/upgrade-schema.php … Continue reading

Posted in Software | Tagged | Leave a comment

Writing Your First WordPress Plugin

This post describes how to develop a WordPress plugin that can be used to count visits to a WordPress site. The basic idea is that we will create a table visitor_log in which we will store the timestamp, url_visited, ip_address, … Continue reading

Posted in Software | Tagged | 2 Comments

Backing up WordPress db

It is very important to backup wordpress db. This is done using mysqldump command. In the basic form: mysqldump -u wpreader –password=’password’ wordpress > backup.sql But we need to automate this and protect the password. This is done by following … Continue reading

Posted in Software | Tagged | 1 Comment