WordPress on of the most popular CMS (Content Management System) on all over the internet. It's make thing easy for you , easy setup.
What is Contabo VPS anyway?
You guys know already WordPress is web application, so its must be somewhere hosted on server.
If you are wondering what is hosting( for beginner only) hosting a website or a web application. Its a online server it can be access from all over the world. All of your website files and databases uploaded to that server.
Two type of Hosting
Now if you ready to go ahead and host a website, our essential scenario is WordPress. Here is two main type of hosting.
Shared server hosting
In short on the same server on which one you are planning to host your website, on that server also other hundred of website installed. Like Bluehost, Godaddy,Hostinger.
VPS Hosting
Virtual Private Server it's mean this will be your own server, you are the owner of whole server. You will host a website on your own server.
Which one should choose?
VPS is the best option, it's have own server with a full management and better performance.
Yeah i know shared hosting is cheap, But you know what? Quality matter,
Only 3.99 € per month Contabo VPS services, price is the same almost only 90% cheap shared hosting compare to VPS.
So why you not buying VPS services? I will totally recommend Contabo VPS server.
About setup don't worry we will go through all step by step guide. So no need to worry about.
Get a VPS server from Contabo
1.Open Contabo VPS website.
Later you can choose higher powerful resources VPS once your business stand up.
2. Set VPS options
Add PTR
Enter PTR Record if you were promoted, now put your domain name. that's good you are doing great be patient.
Confirm your order continue to billing page, move to next steps other step are easy self explanatory.
Let's get start to install WordPress on Contabo
Domain Name
First thing first get a domain name, decide think which domain name will suites you and your business, just goto Godaddy.com, Enom, Freenom, Namecheap etc and buy a domain Name, even you will get on only 1$ per year, it's super cheap.
My recommendation is buy domain with ( .COM ) like YourWebsite.com
It's good for business purposes, it's represent professionalism.
Login info
Wawoo you got the server cheer !!
Map Domain name to your Contabo VPS server
We have got domain and VPS server but it's not connected, let's see how to connect.
For the access WordPress website we want to use domain name not with IP,
Our VPS server can access through IP,
We will map the domain name to access WordPress website and VPS Server through domain name and IP.
How to configure your DNS records
In your domain provider's ( Godaddy or from which you buy) open DNS management zone and edit the main record like this
Host : points : Your server IP will be here.
Installing WordPress on VPS server.
Open putty ( SSH client) enter server IP or name, then press open.
Login as root, after that put a password which one they send you by email.
On putty you can't see password while you typing password
, type the password and hit enter.
1.Create MySQL Database and user WordPress.
MySQL is the part of LAMP which is we have already installed it. WordPress uses MySQL to store site, manage site and store user information.
We need to make a databases and user for WordPress to use.
Log into MySQL root ( administrative) account by using this below mention command.
mysql -u root -p
Put the password hit enter
Create a separate database that WordPress will control.
Run this command
CREATE DATABASE WordPress DEFAULT CHARACTER SET utf8 COLLATE
utf8_unicode_ci;
Always command end with semicolon (;)
For exclusively operates our new database we have to create separate
MySQL user account.
We will use WordPress in this guide you can change later.
Create this account set the password, and grant access to the database we
just created.
Put strong password
We will put this below command,
CREATE USER 'wordpressuser'@'localhost' IDENTIFIED BY
'Enter_Your_Password_Here';GRANT ALL ON wordpress.* TO
'wordpressuser'@'localhost' IDENTIFIED BY
'enter_a_custom_password_here';
Finally we got database and user account. Flush the privileges for the
current instant of MySQL knows the recent we have just made.
FLUSH PRIVILEGES;
Exit out of MySQL by typing:
EXIT;
Done!
2.Additionally PHP Extension installing.
To install WordPress plugins leverage additional PHP extension.
sudo apt update
THEN
sudo apt install php-curl php-gd php-mbstring php-xml php-xmlrpc php-soap php-intl php-zip
LET'S restart Apache web service to load these new extension in text section.
Restart command
sudo systemctl restart apache2
3.Downloading WordPress
Server is configured successfully, now it's time to download WordPress and settings up. We will get the latest version.
Initiate following commands to change the current directory.
cd /var/www/html
Download WordPress files command
curl -O https://wordpress.org/latest.tar.gz
Initiate command for extracting compressed file to create directory structure:
tar xzvf latest.tar.gz
Now attaching downloaded WordPress to server.
You need check also how to host a PHP script for example Xerochat from Codecanyon
5. Apache Configuration Adjustment
WordPress installation finished, only need to configure apache in this way we can able to access to our website through domain name.
Open WinSCP and navigate to /etc/apache2/sites-available/ this directory.
Create empty file and give name ( domain.conf ) change domain to your domain
Open domain.conf then copy and paste the below mentioned into the file and must save.
<VirtualHost *:80> ServerAdmin admin@domain DocumentRoot /var/www/html/ ServerName domain ServerAlias domain <Directory /var/www/html/> Options +FollowSymlinks AllowOverride All Require all granted </Directory> ErrorLog ${APACHE_LOG_DIR}/error.log CustomLog ${APACHE_LOG_DIR}/access.log combined </VirtualHost>
Please note : replace the word domain to your domain name.
4.Enable configuration in Apache and restart service
Initiate following command to restart the services and apply commands and finalize process.sudo a2ensite domain.confsudo a2enmod rewritesudo systemctl restart apache2.service
We are almost done be patient.
5. WordPress directory need to configure
In WordPress directory need to adjust some minor settings first.
Adjusting the permission and ownership
This setting will perform automatic update once we proceed, also it will able to read and write WordPress files.
Proceed belwo mention command
sudo chown -R www-data:www-data /var/www/html
Now we will initiate two find command to set the correct permission on the WordPress files and directories.
sudo find /var/www/html/ -type d -exec chmod 750 {} \; sudo find /var/www/html/ -type f -exec chmod 640 {} \;
I think it's enough permission to get started some plugins may requird additional tuning.
For our installation we need some secret key for security, luckily WordPress have own secure generator for these value to not come up with your own secret keys.
Type in putty to grab secure values from the WordPress secret key generator.
curl -s https://api.wordpress.org/secret-key/1.1/salt/
Once you proceed above command you will get unique values it will looks like this,
Outputdefine('AUTH_KEY', '1jl/vqfs<XhdXoAPz9 DO NOT COPY THESE VALUES c_j{iwqD^<+c9.k<J@4H'); define('SECURE_AUTH_KEY', 'E2N-h2]Dcvp+aS/p7X DO NOT COPY THESE VALUES {Ka(f;rv?Pxf})CgLi-3'); define('LOGGED_IN_KEY', 'W(50,{W^,OPB%PB<JF DO NOT COPY THESE VALUES 2;y&,2m%3]R6DUth[;88'); define('NONCE_KEY', 'll,4UC)7ua+8<!4VM+ DO NOT COPY THESE VALUES #`DXF+[$atzM7 o^-C7g'); define('AUTH_SALT', 'koMrurzOA+|L_lG}kf DO NOT COPY THESE VALUES 07VC*Lj*lD&?3w!BT#-'); define('SECURE_AUTH_SALT', 'p32*p,]z%LZ+pAu:VY DO NOT COPY THESE VALUES C-?y+K0DK_+F|0h{!_xY'); define('LOGGED_IN_SALT', 'i^/G2W7!-1H2OQ+t$3 DO NOT COPY THESE VALUES t6**bRVFSD[Hi])-qS`|'); define('NONCE_SALT', 'Q6]U:K?j4L%Z]}h^q7 DO NOT COPY THESE VALUES 1% ^qUswWgn+6&xqHN&%');
These configuration line we will paste in our configuration file to set secure keys.
Open the WordPress configuration file with WinSCP and replace these lines like in below image.
6. Finalize settings through web interface.
Type your domain name or IP in browser.
http://server_domain
Select your language which one you will use.












No comments