Fast WordPress hosting, for development

In some occasion certainly you need to mount a WordPress very fast to develop but avoiding to have to mount all the system completely. If this it is your case, you can do it fast and easy.

We have a manual already to mount a WordPress stable on Ubuntu 18. Basing us on this possibility, we are going to see how mount a VPS (or in the premises) in which is not necessary to mount much system. The main thing is to have a data base mounted, and to have PHP. Nothing else.

We leave from the base of which we mounted a VPS cheap. In this case we will prepare all the process from zero.

Once the operating system is installed, first that we will form will be the hour of the servant. In this case we will form the hour zone of Madrid.

timedatectl set-timezone €˜Europe/Madrid€™ timedatectl set-NTP on

The following thing that we will do is to verify the version of the operating system and, later, to make a complete update of the same.

update lsb_release - to apt - and && apt - and upgrade && apt - and dist-upgrade && apt - and autoremove

Once this all updated, we installed some tools and software base that can be useful to have in the system.

apt - and install software-properties-common curl vim unzip ufw

The following step will be the installation of the data base. In this case we are going to use MariaDB 10.3. First that we will do will be to form the unloading, and later its installation.

apt-key adv --recv-keys --to keyserver hkp://keyserver.ubuntu.com:80 0xF1656F24C74CD1D8 add-apt-repository €˜deb [arch=amd64, arm64, ppc64el] http://tedeco.fi.upm.es/mirror/mariadb/repo/10.3/ubuntu bionic main€™ apt - and update && apt - and upgrade && apt - and dist-upgrade && apt - and autoremove apt - and install mariadb-server mariadb-client

Now that is installed, we will come to the initial configuration. For it we will use the system safe installation, that it will do some questions to us.

mysql_secure_installation

To the question of if we want to change the password, following if we have put or not in the installation, we will change it. In case of not to have put no, is very recommendable to put a safe password to him.

Set root password? [Y/n]: And

The rest of questions, we will answer the following thing:

Remove anonymous users? [Y/n]: And Disallow root login remotely? [Y/n]: And Remove test database and Access to it? [Y/n]: And Reload privilege tables now? [Y/n]: And

At this moment already we will have the data base formed. Now we will cause that one executes in re homes of the system and we will initiate it.

systemctl stop mysql.service systemctl start mysql.service

Now we are going to install and to form PHP so that it works correctly with the data base and so that it makes of Web server. In this case we are going to install version PHP 7.3. First we will make the installation of the up-to-date packages more (than they are not those that come with the operating system) and that in case of needing it, in addition, would allow us to have several versions of PHP in parallel.

add-apt-repository ppa: ondrej/php apt - and update && apt - and upgrade && apt - and dist-upgrade && apt - and autoremove apt - and install php7.3 php7.3-fpm php7.3-common php7.3-dev php7.3-cli php7.3-bcmath php7.3-curl php7.3-gd php7.3-imap php7.3-json php7.3-mbstring php7.3-mysql php7.3-opcache php7.3-soap php7.3-XML php7.3-xmlrpc php7.3-zip php-imagick php-libsodium php-ssh2 php-xdebug libgeoip-dev

Now that we have PHP and MariaDB already we can begin to work since they are both requisite indispensable so that WordPress works. How it is possible? Then thanks to the fact that PHP for a few versions incorporates an internal Web server, that although is not extremely stable, is sufficient as maintaining it in way developer to it.

For it we will create and enter where we want to lodge our WordPress.

to mkdir /home/example.com/ to mkdir /home/example.com/public_html/ CD /home/example.com/public_html/

Once we have the structure of folders created we can unload WordPress and decompress it.

wget https://wordpress.org/latest.zip unzip latest.zip CD wordpress/

Now that we have WordPress unloaded and in its folder, we can take the Web server. The system works perfectly putting the public IP, if we worked in a VPS and by port HTTP (80) as if we worked in the premises (pon the public or deprived IP of your machine:

php - S 127.0.0.1: 80

Now he is as simple as to enter the navigator and to accede to the Web with the IP:

http://127.0.0.1:80/

It is possible to be formed also (if you have some Web server in production) for example in another port, changing: 80 by: 8000 u: 8080.

It lets a commentary