X

Thank you for trying AMP!

We have no ad to show to you!

How To Install WordPress on Contabo VPS (WITHOUT cPanel and Webnim)

Contabo is a hosting website that has over 130,000 satisfied customers. In this Comprehensive Guide, I will demonstrate how to install WordPress on Contabo without using Cpanel or Webmin. This allows you to save money on Cpanel and Webnim resources that aren’t needed by you.

WordPress is the most popular and easiest to use content management system for creating blogs and web pages.

What is Contabo VPS?

Because WordPress is a web, it must be publicly hosted someplace on the internet. What is meant by Hosting?

Hosting a website entails simply uploading files and data to a server where they can be viewed by everyone.

Hosting Options For you:

In terms of website hosting, we have primarily two options.

Shared hosting:

It is a very popular method, and nearly all websites use it. Shared hosting is simply hosting a website on GoDaddy, Hostinger, and Hostgator in which your website is hosted alongside thousands of other websites on the internet and on the same server.

VPS Hosting:

VPS stands for “Virtual Private Server,” and this server is dedicated solely to you and your website.

Which one is better?

Without a doubt, VPS hosting is superior to shared hosting because you have complete access to your server’s functionality.

Most people believe that shared hosting is less expensive, but this is completely false. The Contabo VPS service is available for 6.99 € per month. The price is 90% compared to other shared hosting platforms.

Because Contabo has the best servers, they require some technical knowledge to set up a VPS server, but I’m here to help you with a step-by-step guide that makes everything look so simple.

Install WordPress on Contabo: Let’s Start!

Some things to consider before hosting.

Getting a Domain Name:

Obtaining a domain name is the simplest aspect of creating a website. Namecheap, GoDaddy, and Google Domains offer domains for as little as $1,$2 per year.

I recommend that you purchase the .com domain because it is a high-level domain and most searches are conducted using.com. If you already have a domain name, you can skip this section and proceed to purchase a Contabo VPS.

Getting a VPS server From Contabo:

1. Open Contabo Website.

Open your browser and navigate directly to the Contabo VPS page.


There are many VPS server options available here, but choose the cheapest one because it will suffice.

As your company grows, you can upgrade to a more powerful VPS server.

2. Setting VPS options:

On the following page, you must select an operating system.

Always go with Ubuntu 18.04.

 

Now the billing page appears, and I believe it is very simple to pay for and purchase it, and I believe it is unnecessary to elaborate.

Within the next 24 hours, They will configure the server and send you instructions via email.

The Mapping Domain name to the VPS server:

We now have a server and a domain name, but they are not connected, so it is time to connect them.

Your VPS server is easily accessible via the IP address that Contabo sent to your email, but we don’t access WordPress via IP address; instead, we use a domain name.

Now we map the domain name to the VPS IP, allowing us to access WordPress and the VPS via both the IP and the domain name.

Configure DNS Records:

Simply open the DNS management zone in your domain provider (in my case, GoDaddy) and edit the main A Record as follows:

host: @ points: YOUR SERVER IP.


I know you will do it easily.✅

Install WordPress on VPS:

Now that our server is ready for installation, you can see how simple it is.

Now Come to work again,

Connect your VPS server to any SSH client like putty. and let’s start.


Open putty and write IP or name, and click on open.

They will ask you to open it; simply enter “root” as a user and the password that Contabo sent to you via email.

Putty will not show you the password while you are writing it, but don’t worry, the password is there.


Done✅

Step 1 – Creating a MySQL Database and user for WordPress:

WordPress saves data and site information in MySQL. Although MySQL is already installed as part of the LAMP stack, we must create a database and user to use WordPress.

Begin by logging into the MYSQL root (administrative) account with the command:

mysql -u root -p

They ask you to write the root password, simply write it.

To begin, you must create a database that will only be used by WordPress.

CREATE DATABASE wordpress DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci;

Remember one thing every MYSQL statement must be ending at semi-colon (;) otherwise you will not proceed.

To begin, create a database that will only be used by WordPress. 

Creating a single-function database is an effective way to manage and secure it. In this guide, we will refer to ourselves as “WordPressusers.” It’s entirely up to you if you want to change it.

We’ll create an account and assign a password to our grant access database, which we just created. We can accomplish this by typing the following 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';

You now have a database and account that are solely for WordPress. Now we do something to notify MYSQL that these changes were made recently.

FLUSH PRIVILEGES;

Exit the MySQL by this command:

EXIT;

Yup✅

Step-2 Installing Additional PHP Extensions:

WordPress has a plethora of additional PHP Extensions to choose from.

By typing: we will download the best and most popular WordPress extension.

sudo apt update

Then:

sudo apt install php-curl php-gd php-mbstring php-xml php-xmlrpc php-soap php-intl php-zip

To load these new extensions, we will restart the Apache service. If you want to return and install additional plugins, simply restart Apache with the following command:

sudo systemctl restart apache2

Step-3 Download the WordPress:

It’s now time to download and install WordPress. I recommend that you always install the most recent WordPress version for security and other reasons.

Run the following command to change the directory to Html:

cd /var/www/html

WordPress Download files:

curl -O https://wordpress.org/latest.tar.gz

For WordPress directory structure extract the compressed files:

tar xzvf latest.tar.gz

Welldone✅. 

Step-4 Adjust the Apache Configuration:

We simply need to configure Apache so that we can access our website via our domain name. Navigate to the following directory in WinSCP:

/etc/apache/sites-available.

Create an empty file with the name “domain. conf” after that ( change this “domain” to your domain)

The next step is the open domain.conf then copy it and paste it below and save it.

<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>

Restart the service after enabling configuration in Apache.

Simply run the following commands to complete the setup:

sudo a2ensite domain.conf
sudo a2enmod rewrite
sudo systemctl restart apache2.service

Almost done.

Step-5 Configuring the WordPress directory:

Before we open WordPress in a browser and complete the installation, we need to make some changes to the WordPress directory.

Adjusting the Ownership and Permissions:

Setting up reasonable file permissions and ownership is one of the most important things we need to do.

We’ll begin by giving the www-data user and group ownership of all files. The Apache webserver runs as this user, and Apache must be able to read and write WordPress files to serve the website and perform automatic updates.

update the ownership Using chown.

sudo chown -R www-data:www-data /var/www/html

Following that, we’ll run two find commands to change the permissions on the WordPress directories and files:

sudo find /var/www/html/ -type d -exec chmod 750 {} ;
sudo find /var/www/html/ -type f -exec chmod 640 {} ;

To begin with, these should be reasonable permissions. Some plugins and procedures may require additional modifications.

Setting up the WordPress Configuration File:

Now we must make some modifications to the main WordPress configuration file.

When we open the file, the first thing we’ll do is change some secret keys to add some security to our installation. WordPress provides a safe generator for these values, so you don’t have to come up with them on your own. Because these are only used internally, having complex, secure values here won’t hurt usability.

Putty: to get secure values from the WordPress secret key generator:

curl -s https://api.wordpress.org/secret-key/1.1/salt/

You will receive unique values that look 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 are configuration lines that we can directly paste into our configuration file to set secure keys. Copy the output you just received.

Now, using WinSCP, open the WordPress configuration file and replace the lines as shown below:

 

Step-7 Completing the Installation Through the Web Interface:

Now that the server configuration is finished, we can proceed with the installation via the web interface.

Navigate to your server’s domain name or public IP address in your web browser:

http://server_domain

Choose the language you want to use:


Great! WordPress is now installed and ready on your Contabo VPS!

Please leave any questions in the comments section.

More Article:

Hostinger Full Review.

admin@786: