Menu
Articles on WordPress development and general web development: 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.
Articles
- [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
- [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.
- [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 - [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.
- 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.
- [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 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 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
- 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. - 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.