Menu
Article Categories
- Web Development
Articles on WordPress development and web development in general: how to add a sidebar in WordPress, add colors to the Gutenberg color palette, configure an Ubuntu VirtualBox virtual machine for web development, get a country name from an IP address, make MySQL 8 compatible with older versions, do a partial mysqldump, etc. - Docker
Articles on running different services in Docker: how to set up Postfix containers and send emails from WordPress, add XDebug to WordPress in Docker, test WordPress themes and plugins in Docker containers before using anything on production, add a simple email forwarder, etc. - Linux
Articles on Linux: how to install KVM on Ubuntu, install Ubuntu on KVM, copy files and directories between Linux servers and on one server, exit Putty without killing the session, etc.
Recent Articles
- How to Install Ubuntu 22.04 Virtual Machine on KVM
Get all parameters necessary for installation from the Ubuntu image file. Install a virtual machine with Ubuntu 22.04 on KVM with the commandvirt-install
. Configure networking. - How to Install KVM on Ubuntu 22.04 Server
Install KVM packages on an Ubuntu 22.04 Server. Configure network Interfaces. Also, you can install KVM on a VirtualBox virtual machine if you’d like to try it first. - [VirtualBox] Configure an Ubuntu 22.04 / 20.04 Virtual Machine for Web Development (Complete Guide)
The complete guide on creating a VirtualBox VM for web development. See how to- Create Ubuntu 22.04 / 20.04 VirtualBox virtual machines.
- Configure the network on a bridged adapter or 2 adapters: NAT + host-only.
- Install Guest Additions.
- Share folders between the host machine and the virtual machine.
- Optimize performance.
- How to Create Symlinks in a Folder Shared to VirtualBox via Guest Additions on Windows
Create Symbolic Links in a Folder Shared to VirtualBox via Guest Additions on Windows - [Docker] How to Set up Postfix Containers and Send Emails From WordPress in Docker
Add SMTP mail functionality to a Docker WordPress image. See how to - How to Add XDebug to the Official Docker WordPress Image
Use a Dockerfile to add XDebug to the official Docker WordPress image:- Build your own WordPress image with XDebug enabled.
See examples ofDockerfile
anddocker-compose.yml
. - Do not want to build? Download a pre-made image from a repository on Docker Hub.
- See how to configure PhpStorm for debugging.
- Learn how to separate production and development environments using multiple Docker Compose files.
- See how to use Nginx in Docker as a Reverse Proxy.
- See how to add PHP extensions to the Docker WordPress Image.
- Build your own WordPress image with XDebug enabled.
- [WordPress] How to Replace Category Pages With Static Pages Programmatically
Replace your category pages with static pages just with a few lines of code:- Add a static page. Do not publish it.
- Modify the category template.
- Apply CSS styles if necessary.
- Conditional or Partial MySQL Dump
Domysqldump
conditionally:- Export some tables only.
- Ignore some tables.
- Limit the number of rows.
- Export procedures and functions only.
- Export the database structure only.
- Export InnoDB tables without locking them, etc.
- [WordPress] How to Add a Sidebar Programmatically in 2024
To create a sidebar:- Register the sidebar with
register_sidebar()
. - Add the sidebar to your theme template with
dynamic_sidebar()
.
- Register the sidebar with
- How to Copy Directories and Files on a Linux Server
Use the commandcp
on the command line on the Linux server to- Copy a directory.
- Copy a file.
See the most commonly used arguments.
- How to Use WordPress Docker Container for Testing Themes and Plugins Locally
Test WordPress themes and plugins locally in Docker containers before deploying them on production:- Install WordPress quickly with Docker Compose.
See the example ofdocker-compose.yml
. - Reinstall WordPress in a Docker container easily.
- Install WordPress quickly with Docker Compose.
- [WordPress] Show Extended Information in the Plugin Query Monitor With No Symlink to db.php
Show extended query information in the WordPress plugin Query Monitor even when a symbolic link to the filedb.php
can not be created. - How to Get Country From IP Address in PHP on Ubuntu 22.04
Get the country name and country code from the visitor’s IP address in PHP with the GeoIP2 library:- See how to install and configure the GeoIP2 library on Ubuntu 22.04.
- See an example of code for getting the country name and country code.
- How to Copy Files and Directories Between Linux Servers
To copy a file or folder between Linux servers directly:- Go to the destination directory.
- Use the command
scp
.
- How to Keep a Bash Script Running After the Putty Terminal Gets Closed
To keep a bash command or script running after the Putty terminal gets closed:- Use the command
screen
. - Detach the session by pressing
Ctrl+A
, thenD
. - Close Putty.
- Reconnect to the Linux server.
- Check the command or script is still running.
Or use the commandsnohup
+disown
.
- Use the command
- [Docker] How to Create a Simple Email Forwarder in 2024
Create an e-mail forwarder in a Docker container. The solution is quick and simple:- Add MX records for all domains that require mail forwarding.
- Configure and run the Docker container.
- How to Make MySQL 8 Compatible With Older MySQL Versions
Make MySQL 8 compatible with old MySQL versions. Make passwords compatible, and deal with errors. See some examples of setting SQL Modes in MySQL 8. - [WordPress] How to Add Colors to Color Palette in Gutenberg Block Editor in 2024
- Add colors to the existing color palette in the WordPress Gutenberg editor.
- Or completely replace the existing color palette.
Integrate the code into your theme or a plugin.
- 12 Settings to Simplify Work In PhpStorm in 2024
Change some default settings in PhpStorm to make your work faster:- Hide browser icons.
- Open search results each time in a new tab.
- Turn on Mark modified (*)
- Increase the tab limit.
- Turn off Code Analysis on commits to Git.
- Turn off Restoring Context on Switching Git Branches, etc.
- Creating a Virtual Machine in VirtualBox 6: Step-by-Step Guide
Step-by-step guide on how to create a virtual machine in VirtualBox 6. Each step is illustrated with images.