How to increase your Wi-Fi connection speed

Problem:

You have a slow Wi-Fi connection speed.

You want to increase your Wi-Fi connection speed.

Solution:

Execute below command on Windows:

netsh wlan show interface
  • If your Signal is less than 20% then try to increase your Wi-Fi signal strength by moving your device closer to your Wi-Fi router.
  • If you cannot change your device and Wi-Fi router location then try connecting your Wi-Fi router to another Wi-Fi router (Wi-Fi extender) that acts as a new access point using LAN cable.
  • If you cannot use a LAN cable then try connecting your router to a Wi-Fi repeater that is closer to your device.
  • If your Radio type is 802.11n then try to upgrade both your device and router to support 802.11ac.
  • Try to upgrade your Wi-Fi router to support 5 GHz band.
  • Try to upgrade your Wi-Fi router to support MU-MIMO (which stands for Multi-User, Muliple Input, Multiple Output).
  • Compare Receive rate (Mbps) and Transmit rate (Mbps) before and after making a change.
  • Use Speedtest to compare your Wi-Fi connection speed before and after making a change.

How to add multiple IPs to an Amazon EC2 virtual machine

Motivation:

You have a Server 2008 R2 machine on Amazon EC2.

You want to secure multiple domains using different  SSL/TLS certificates.

Server 2008 R2 does not support Server Name Indication (SNI). Therefore you need to add multiple IPs to Server 2008 R2 machine to use different SSL/TLS certificates.

Solution:
  1. Create an EC2 virtual machine.
  2. Click on Network Interfaces tab.
  3. Click Create Network Interface button or select an existing network interface and select Actions > Attach.
  4. Click on a network interface ID, click Actions, click Manage IP Addresses, click on the network interface name (beginning with eth…), click the Assign new IP Address button, enter a private IP Address (e.g. 172.30.0.32), click the Save button, click the Confirm button.
  5. Click Elastic IPs tab, click the Allocate Elastic IP address button, click the Allocate button, optionally name the new allocated IP.
  6. Select the new allocated IP, click on Actions , click Associate Address, choose Network interface, then choose a private IP of the network interface with which the elastic IP will be associated, click the Associate button.
  7. Login Windows.
  8. View the network configuration using below command, note the Default Gateway and DNS Servers information.
ipconfig /all

9. Open Control Panel\All Control Panel Items\Network and Sharing Center.

10. Click Change adapter settings link, click a Local Area Network Connection Network.

11. Manually enter one IP address, Default Gateway and DNS Servers information.

12. Click Advance… button to open Advanced TCP/IP Settings screen, and add the private IPs in the 4th step to the machine.

13. Restart the machine.

If you get any issue then try limit the number of private IPs of a network interface to 4 (including the default private IP).

How to move a WordPress instance from one server to another Linux server

Motivation:

You want to move a WordPress instance from one server to another to consolidate your websites to reduce cost.

Solution:

Install and use below Duplicator plugin to achieve your goal.

https://wordpress.org/plugins/duplicator/

User guide: https://snapcreek.com/duplicator/docs/quick-start/

If everything goes well for you then congratulation!

Otherwise, please review below possible problems and corresponding solutions.


Problem 1:

You don’t have a website on the new server.

Solution 1:

1. Create a new virtual host in the /etc/httpd/conf/httpd.conf

<VirtualHost *:80>
ServerName example.com
ServerAlias www.example.com
DocumentRoot "/var/www/www.example.com"
</VirtualHost>

2. Set 775 permission for /var/www/www.example.com

3. Restart httpd service

sudo systemctl restart httpd

Problem 2:

You are using Amazon Linux 2 server.

You are logged in as ec2-user.

You use WinSCP to upload files and edit configuration files.

You cannot modify /etc/httpd/conf/httpd.conf and /etc/php.ini.

Solution 2:

1 View permission settings for the file

ls -ld /etc/httpd/conf/httpd.conf

The result indicates that the file owner is root user and root group, not ec2-user.

2. View groups of a user

groups ec2-user

The result indicates that the ec2-user does not belong to root group.

3. Add a user to root group

sudo usermod -a -G root ec2-user

4. Grant Read-Write permission against a file to root group

sudo chmod g+rwx /etc/httpd/conf/httpd.conf
sudo chmod g+rwx /etc/php.ini

5. Logout and login to the server again.


Problem 3:

You are using Amazon Linux 2 server. The ZipArchive feature is missing.

Solution 3:

1. Execute below commands:

sudo amazon-linux-extras install php7.2
sudo yum install php-pear php-devel gcc libzip-devel zlib-devel
sudo pecl install zip-1.13.5 # we must specify a slightly older version due due to compatibility

2. Add “extension=zip.so” to /etc/php.ini

3. Restart the server

sudo reboot

Problem 4:

You don’t have a WordPress database on the new Linux server.

Solution 4:

Execute below MySQL commands:

CREATE USER 'username'@'localhost' IDENTIFIED BY 'password';
CREATE DATABASE `wp_database`;
GRANT ALL PRIVILEGES ON `wp_database`.* TO "username"@"localhost";
FLUSH PRIVILEGES;

Problem 5:

An database error occurs while restoring a website.

Solution 5:

1. Execute below commands to remove the website:

sudo chown -R ec2-user:apache /var/www/example.com
sudo chmod 2775 /var/www/example.com && find /var/www/example.com -type d -exec sudo chmod 2775 {} \;
find /var/www/example.com -type f -exec sudo chmod 0664 {} \;
rm -r /var/www/example.com

2. Upload the Duplicator files again, and restore the website again.


Problem 6:

No write access against /var/www/example.com is available for Duplicator.

Solution 6:

1. Execute below commands:

sudo chown -R ec2-user:apache /var/www/example.com
sudo chmod 2775 /var/www/example.com && find /var/www/example.com -type d -exec sudo chmod 2775 {} \;
find /var/www/example.com -type f -exec sudo chmod 0664 {} \;

2. Run http://example.com/installer.php again.