How to install WordPress manually through Cpanel?

Hello Everyone.

This article is a step by step guide to install WordPress manually on your site through Cpanel.

Now you might ask, Why would you install it manually? when I can use the auto installer. Offcourse auto-installer is a great feature which reduces our effort.

These installers work great in many cases, but often stuff your site full of unwanted plugins and themes. In addition, these automated tools have a reputation for timing out or being completely unavailable at times, which can be frustrating if you’re on a deadline.

Also by doing manual work you get a better understanding of the system.

So, let’s start.

Wp manual installation: Steps.

Step 1: Download WordPress.

To be able to use WordPress CMS, you would need to download it from the official WordPress site. (WordPress.org)

Step 2: Upload WordPress.

Upload the downloaded package to your hosting account. This can be done in the following three ways:

  • Uploading via File manager. Within the File Manager, locate and navigate to that directory. From the toolbar of the cPanel, select “Upload” and browse for the file you downloaded from WordPress.org.
  • Uploading via FTP (file transfer protocol).
  • Uploading SSH (secure socket shell).
Step 3: MySQL DataBase. 

Create a MySQL database and user. For storing the data you will need to create a database which can be done using the below procedure.

  • Login to your Cpanel.
  • Under the database section, select the MySQL database wizard.
  • Create a Database and enter the database name. Click Next Step.
  • Create Database Users and enter the username and password. Click Create User
Step 4: Connect WP to DataBase. 

Now is the time to connect the database with WordPress. In order to do that fill up the details form step 3 in WordPress too.

  • On starting WordPress it will ask for important details to connect the database.
  • Enter the database username.
  • Enter the database password.
  • Choose the Database Host. You can get this info from your web host.

Submitting all this will connect your database to WordPress account.

Step 5: Script installation.

The last job is to execute the installation script from the installation page. You can find the script using either of the below URLs:

  • http://yourdomain.com/wp-admin/install.php
  • http://yourdomain.com/blog/wp-admin/install.php

That’s it. You have successfully installed WordPress to your site. Enjoy the best wp themes and plugins now.

I hope that this article may have helped you. We may talk about Softaculous in the near future so stay tuned.

Thank You.

Fix Magento 2 – php cli error on cpanel or other hostings

The problem:

On a fresh install of Magento2 on cpanel based hosting, you receive the following error while running any command on SSH

[eee@e1 www]$ php bin/magento cache:clean
X-Powered-By: PHP/7.0.31
Content-type: text/html; charset=UTF-8

bin/magento must be run as a CLI application
[eee@e1 www]$ php bin/magento setup:upgrade
X-Powered-By: PHP/7.0.31
Content-type: text/html; charset=UTF-8

bin/magento must be run as a CLI application

The Solution:

You have to point php to correct binary;
Use the following code in order:
First, open the file which can alter the runtime variables like .bash_profile or .bashrc

cd ~ ; nano .bash_profile
OR
cd ~ ;nano .bashrc

Go to last line and paste this (depending upon php version change ea-php71 or ea-php70):

alias php='/opt/cpanel/ea-php71/root/usr/bin/php'

Save the file and exit the editor.
Log out and login again OR use the following command

$ source ~/.bashrc

If you are not sure about current php version, use which php or php -v command. If you think the cpanel configuration is the issue, fix EasyApache 4 PHP cli issue. With this way you can fix the setting and enable the new php version

[SOLVED] PHP must be run as a CLI application error : Content-type: text/html; charset=UTF-8

php bin/magento cache:clean
Content-type: text/html; charset=UTF-8
bin/magento must be run as a CLI application

as root user, run the following commands (For php v7.0)

# yum install ea-php70
# source /opt/cpanel/ea-php70/enable

The solution involves fixing php variable’s path. We need to find which php is being used right now, you can find out by

$ which php
$ php -v

To fix this PHP cli error, see how to edit php in bash profile (.bashrc)

How to connect cpanel through SSH

Following are the steps to connect to cpanel through SSH:-

  1. Go to your cpanel and create a public private key-pair,

under SSH access->manage keys.

2. Under manage keys section, go on create a new key.

3. Create a key and give key name, key password, key type and key size.

4.  Click on generate keys and it will look something like this.

5. Go back and under public key  section ,

select your public key->manage->authorize key.

6.After that go to private key section and click on download private key and enter the same paraphrase (password) that you’ve entered before (key password).

7. After the keys are downloaded, open PuTTY.  Go to sessions and enter username and hostname .eg [email protected].

8. Go to SSH , select SSH Protocol version 2:

9. Under SSH, go to Auth, and select the private key downloaded and click open

10. A terminal will pop up. Enter your key paraphrase.

11. Done , you are now connected to your root folder via SSH.

 

How to install wordpress on cPanel

WordPress is a free and open-source content management system (CMS) based on PHP and MySQL.Features include a plugin architecture and a template system.

Follow these steps to install WordPress:

Download WordPress

Download WordPress from this link:  https://wordpress.org/download/

Create Database

Create an empty database for WordPress and specify it’s username and password.

Set up Wizard

  • Step 1: Upload the downloaded compressed file on your website root directory and extract it.

  • Step 2: Open the url of your website and install WordPress.

 

  • Step 3: Specify the  Database Name, Username, Password and Database Host.

  • Step 4:  A confirmation message will appear after the database settings are validated. Click on ‘Run the Installation’ button.

  • Step 5:  Provide the administrative information needed for your WordPress website and Install WordPress.

  • Step 6: You have successfully installed WordPress and the final step is to log in, for which you will use the username and password entered at step 5.