In this post we will see, how we can change the default port (port 80) of Wordpress to something else (port 1280) in order to have port 80 available for other applications to use. To make this change we will need to change 2 main things, the Apache configuration files and some options in the MySQL database. We are assuming that Wordpress is installed in a LAMP stack on an Ubuntu or Debian server.
Wordpress Installation and Configuration Guide. Prerequisites Create a sudo user on your server Install a LAMP stack Secure your site with SSL (can be done after) Create a MySQL Database and User for WordPress Log in to a MySQL administrative account (root): sudo mysql -u root -p Create wordpress database: CREATE DATABASE wordpress DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci; Create exclusive user for this database: GRANT ALL ON wordpress.
MySQL Install MySQL sudo apt install mysql-server Run security script Accept almost everything, and add secure root password: sudo mysql_secure_installation Change authentication method If you don’t change the authentication method from auth_socket to mysql_native_password then anyone with a sudo user password can log in as root. To check the authentication method, enter MySQL: sudo mysql And type: SELECT user,authentication_string,plugin,host FROM mysql.user; To configure the root account to authenticate with a password, run the following ALTER USER command.