Tag Archive hosting

What is a Dedicated Server?

What is a Dedicated Server?

What is a Dedicated Server?

What is a dedicated server? Glad you asked! This page outlines what a dedicated server is, and explains the benefits of dedicated server hosting over shared hosting.

Dedicated server hosting refers to a type of web hosting plan where you are allocated a whole server to yourself. Therefore, a “dedicated server” refers to the “dedicated” server that you rent (or purchase) in order to host your website (or websites).

Dedicated server hosting can give you more control over your website. It can also help to ensure that other customers’ websites don’t impact on your website. Using dedicated servers is much more expensive than shared hosting, but if your site receives lots of traffic or you have other requirements (such as extra security requirements), dedicated server hosting could be for you.

With dedicated server hosting, you are able to log in to your dedicated server just as you would log in to your own computer. Once logged in, you can install and configure software as you wish.

Dedicated Server with Managed Hosting

Some dedicated server hosting plans are fully managed, meaning that your web hosting company performs regular administration duties, such as initial server setup, patching, anti-virus, security scanning, monitoring, and more.

Other dedicated server plans are self managed – you are responsible for the server setup, patching, anti-virus, etc

As you might expect, fully managed plans can be much more expensive than a self-hosted option. However, unless you have the time and inclination to look after your server 24/7, you might be better off looking for some sort of managed hosting plan.

Some dedicated server hosting plans are managed by default, others are self managed with an optional “service plan”, meaning, you pay extra for your web host to manage your server. Some of these self managed plans have various “add ons” that you can pick and choose. For example, you could add on a backup plan, a server maintenance plan, a security scanning service, etc. With these options, your web hosting company will perform these duties as outlined on a regular basis (for example, weekly or monthly) or perhaps on a one-off basis as required by yourself.

Example of Dedicated Server Hosting

To get a better idea of what’s included with dedicated server hosting, check out these dedicated servers at our partner site, ZappyHost.

What is a Dedicated Server – Another Definition

The term “dedicated server” can also mean a single computer within a network that is reserved for a specific purpose. For example, within a network, you could have a computer dedicated to printer resources, another computer dedicated to Internet connections, another computer serving as a firewall, etc. These computers would all be dedicated servers, as the whole computer is allocated for a specific task within the network.

What is a Virtual Dedicated Server?

A virtual dedicated server is a variation on the dedicated server concept. Instead of hiring the whole physical server, you hire a virtual server.

A virtual dedicated server is also referred to as a virtual private server (VPS). To learn more about VPS hosting, see What is VPS Hosting?.

What is Dedicated Hosting?

What is Dedicated Hosting?

What is Dedicated Hosting?

Dedicated hosting is a hosting configuration in which a server is devoted to a single organisation or for a single purpose, such as a website. This is in contrast to shared hosting, in which a server acts as a host to multiple clients. A dedicated hosting service is sometimes referred to as a dedicated server and can be set up in-house or externally as a service from within a data center. Let’s have a look at some of the benefits.
Customisation – Dedicated hosting grants a certain freedom and control that other hosting solutions are unable to provide. The fact that the server is dedicated to one client and there are no cohabitants means that the server (and overall hosting solution) can be tailored to the specific needs of that client. This ensures that they can select and pay for the features that they require.
Uptime – In a world where convenience is everything and consumers aren’t used to waiting, it is vital to ensure that a website, for example, is functional at all times; site downtime could lead to customers moving on to competitors. Dedicated hosting allows for high performance and stability to ensure that websites and other business functions are operational virtually 100% of the time (usually upwards of 99.4%). To this end, providers should offer server monitoring and back-up facilities alongside support services (described below) to keep functions running as seamlessly as possible.
Congestion – Server congestion is much less of an issue with a dedicated server, especially when compared to shared hosting options. With the latter, you often run the risk of congestion due to the traffic and usage levels of other websites or applications hosted on the same server, competing for bandwidth, disk space and CPU usage. The very nature of dedicated hosting ensures that this isn’t an issue. It also works the other way; if the website in question is resource heavy then dedicated hosting may be the answer to ensure that other websites aren’t disrupted.
Security – Clients using a dedicated platform will be able to deploy security measures, such as anti-virus and firewall configurations, that are more tailored to their own functions; whilst also avoiding the security vulnerabilities that can otherwise be introduced by the activities of neighbouring clients on shared hosting platforms. In addition, dedicated servers located within data centers can benefit from the physical security measures that such facilities often put in place, including, for example, biometric authentication, security guards and mantraps.
Support – Some dedicated hosting services come with a certain level of support. This is important as a high percentage of dedicated hosting customers use the service to host mission critical or important computing functions or websites. Effective support ensures that site disruption is kept to a minimum. A fully managed hosting provider, for example, may offer support 24 hours per day, 365 days a year.
Details of support levels, as well as information regarding reliability statistics can usually be found in the service level agreement (SLA). These documents can often provide an insight into the quality of a particular service and should be consulted carefully when going through the process of choosing a provider.
If opting for a dedicated service that does not come with any support, it is important to ensure the presence of the necessary knowledge to manage and maintain a server effectively.

How to import and export a database via SSH

How to import and export a database via SSH

You can easily import/export your database using phpMyAdmin menu in cPanel. To do so, follow the instructions here. It allows processing only the databases that do not exceed 50Mb. If your database is bigger, you will need to use SSH commands.

Shell access is disabled on Shared servers by default, so if shell access was not enabled for your account previously, first of all, enable it with the help of this article.

The next step is to log into your account via SSH. This tutorial will guide you through this process.

Note that before performing an export or import, you will need to assign a database to a user. You can do it in cPanel > MySQL Databases menu > Add a User to a Database option:

How to import and export a database via SSH
Make sure that you enable All Privileges option:

How to import and export a database via SSH

You can find more instructions on database creation and assigning it to a user here.

In order to import a database, use the following command:

mysql -u dbusername -pdbpassword dbname < /path/to/file/file.sql

You can also use:

mysql -u dbusername -p’dbpassword’ dbname < /path/to/file/file.sql

or

mysql -u dbusername -p dbname < /path/to/file/file.sql

In order to export, use this one:

mysqldump -u dbusername -pdbpassword dbname > /path/to/file/file.sql

The variable in italics are the following: 

  • dbusername: the name of a database user assigned to this database (it should be in the format of CPANELUSERNAME_DATABASEUSER), or your cPanel username
  • dbpassword: the database user password (if you use a database user as a username) or your cPanel password (if you use your cPanel username as a username)

NOTE: No space between -p key and the password if you enter it in the command.

  • dbname: the name of your database you are importing to or exporting from. It should be created in your cPanel. The format is the following: CPANELUSERNAME_DATABASENAME
  • /path/to/file/file.sql: the path to the mysql dump that you are importing to (then a new file will be created) or exporting from your cPanel account. Here you can use both relative and absolute path formats. If you are in the folder with the file, you can just type the file name with the extension. With the absolute path, for example, it will be the following: /home/CPANEL_USERNAME/public_html/database.sql

If you do not receive any error or notification after pressing Enter, it means that the command was performed successfully.

Let us provide with an example.

We will use the following settings:

  • dbusername: nctests_user (as a database user), nctests (as a cPanel username)
  • dbpassword: 123qwe
  • dbname: nctests_database
  • path to the file: /home/nctests/public_html/databases/db_file.sql

After defining all the variables, the command will look the following way:

Database import

mysql -u nctests_user -p123qwe nctests_database < /home/nctests/public_html/databases/db_file.sql 

How to import and export a database via SSH

NOTE: You can also use the following command:

mysql -u nctests_user -p nctests_database < /home/nctests/public_html/databases/db_file.sql 

This way, you need to enter the password in the next line:

How to import and export a database via SSH

Database export

mysqldump -u nctests_user -p123qwe nctests_database > /home/nctests/public_html/databases/db_file.sql 

How to import and export a database via SSH

NOTE: You can also use the following command:

mysqldump -u nctests_user -p nctests_database > /home/nctests/public_html/databases/db_file.sql 

This way, you need to enter the password in the next line:

How to import and export a database via SSH

That’s it!

How to move WordPress from a subfolder

How to move WordPress from a subfolder

This article will take you through the process of moving your WordPress website from the subfolderyourdomain.com/wp to the domain root – yourdomain.com:

 

NOTE: Before proceeding with any changes, make sure that you generate a full backup of your website. If you’ve created your site using Softaculous script installer, feel free to refer to this guide as well (step #4 – Backup software).

for cPanel paper_lantern theme:
Re-installation
Redirection
File migration and Database update

 

Re-installation

If you just installed your website and have done no or little development, WordPress re-installation will be the easiest way out.

You just need to go back to cPanel > Exclusive for Namecheap Customers section > Softaculous Apps Installer menu:

How to move WordPress from a subfolder
Create a new one, make sure the In Directory field is empty and proceed with the installation:

How to move WordPress from a subfolder

Do not forget to uninstall /subfolder website by hitting the red cross in All Installations menu:

How to move WordPress from a subfolder

 

Redirection

If the website is pretty much done and re-installation is not acceptable, you can set up a hidden redirect – the installation will remain in the subfolder, but your website homepage will be yourdomain.com.

Take into account that this redirect will make /subfolder disappear only on the homepage, links will still have it – e.g., yourdomain.com/subfolder/contactus.

If it sounds alright to you, add the following redirect to .htaccess file in the domain web root (replacing yourdomain.com with your actual domain name and subfolder with your subfolder):

RewriteEngine On
RewriteCond %{HTTP_HOST} ^(www\.)?yourdomain.com$
RewriteCond %{REQUEST_URI} !(/|\.[^/]*)$
RewriteRule (.*) http://www.yourdomain.com/$1/ [L,R=301]
RewriteCond %{HTTP_HOST} ^(www\.)?yourdomain.com$
RewriteCond %{REQUEST_URI} !^/subfolder/
RewriteRule ^(.*)$ /subfolder/$1 

1. Navigate to Files section > File Manager:

How to move WordPress from a subfolder

2. Move to the root folder for your WordPress installation – public_html in case it is the main domain for your account.

Once there, make sure that Show Hidden files (dotfiles) option is enabled in Settings menu:

How to move WordPress from a subfolder

3. Locate .htaccess file, right-click > Edit:

How to move WordPress from a subfolder

4. If there is no .htaccess file located in your File manager, feel free to create a new one using File option:

How to move WordPress from a subfolder

You are ready to add the redirect rule and save it.

File migration and Database update

If the option above does not work for you, and you would like to make sure there is no /subfolder on your website, you can go this way.

NOTE: We highly recommend to back up website files and the database before proceeding.

1. File migration

Go to your website folder using FTP or File Manager:

How to move WordPress from a subfolder

How to move WordPress from a subfolder

Select All files > Move them to the domain document root (in our example, from public_html/wp_subfolderto public_html):

How to move WordPress from a subfolder
How to move WordPress from a subfolder

Once done, go back to the domain document root to make sure all files have been moved:

How to move WordPress from a subfolder

2. Database update

You can update old URL references with the new ones in the database either using search and replace scripts or using text editors. Below we provide the guidelines using the latter:

1. To begin with, you will need to locate the database associated with your website. Right-click on the file > View or Edit option:

How to move WordPress from a subfolder

You will see the database name in this line:

How to move WordPress from a subfolder

3. The next steps is to download the backup of the database. It can be done in your cPanel > Files section > Backup menu:

How to move WordPress from a subfolder
How to move WordPress from a subfolder

4. Unzip the downloaded file. Now you can open .sql file with some text editor and update all the URL references.

Hit Ctrl + F and select Replace option. Fill out the corresponding fields, Find – your old domain, Replace – your new domain) and hit Replace All:

How to move WordPress from a subfolder

5. Once done, you should get the output like this:

How to move WordPress from a subfolder

Make sure that you save the changes.

6. Now you can upload the updated database to your cPanel account. To be on the safe side, we suggest creating a new database (instead of dropping the existing one) and connect it to your WordPress side.

To do so, move to Databases section > MySQL Databases menu:

How to move WordPress from a subfolder

7. Follow the steps below to create a new database and user for it:

How to move WordPress from a subfolder
How to move WordPress from a subfolder
How to move WordPress from a subfolder
How to move WordPress from a subfolder
How to move WordPress from a subfolder

Keep these details, you will need to use them a bit later.

8. After that you can upload the database using phpMyAdmin menu in Databases section:

How to move WordPress from a subfolder

9. Select the newly created database from the list on the left and use switch to Import tab. There you will need to use Browse option to pick up the database .sql file from your local device:

How to move WordPress from a subfolder

NOTE: If your database is more than 50Mb, import the database following the steps in this guide.

10. Once done, you will need to update wp-config.php file in your installation root folder:

How to move WordPress from a subfolder

The fields to be changed are:

define ‘DB_NAME’ line – the name of the new database you’ve created in MySQL Databases menu.
define ‘DB_USER’ line – the name of the new user you you’ve created in MySQL Databases menu.
define ‘DB_PASSWORD’ line – the new password you’ve set for database user in MySQL Databases menu.

How to move WordPress from a subfolder

Save the changes and feel free to check your website.

If everything is working fine, you may delete the old database you used for the website.

11. It is also advised to re-generate the permalinks to make sure they have the new URL. You can do it in your WordPress dashboard in Settings menu > Permalinks.

So if you had Post name, you need to switch it to Plain, for instance, save the changes and then revert everything back:

How to move WordPress from a subfolder

 

for cPanel x3 theme:

Re-installation
Redirection
File migration and Database update

Re-installation

If you just installed your website and have done no or little development, WordPress re-installation will be the easiest way out.

You just need to go back to cPanel > Software/Services section > Softaculous > WordPress, make sure the In Directory field is empty and proceed with the installation.

Do not forget to uninstall the /wp website in Softaculous once done:

How to move WordPress from a subfolder

 

Redirection

If the website is pretty much done and re-installation is not acceptable, you can set up a hidden redirect – the installation will remain in the /wp subfolder, but your website homepage will be yourdomain.com.

Take into account that this redirect will make /wp disappear only on the homepage, links will still have it – e.g., yourdomain.com/wp/contactus.

If it sounds alright to you, add the following redirect to the .htaccess file in the domain web root (replacing yourdomain.com with your actual domain name and wp with your subfolder)

RewriteEngine On
RewriteCond %{HTTP_HOST} ^(www\.)?yourdomain.com$
RewriteCond %{REQUEST_URI} !(/|\.[^/]*)$
RewriteRule (.*) http://www.yourdomain.com/$1/ [L,R=301]
RewriteCond %{HTTP_HOST} ^(www\.)?yourdomain.com$
RewriteCond %{REQUEST_URI} !^/wp/
RewriteRule ^(.*)$ /wp/$1 

File migration and Database update

If the variants above do not work for you, and you would like to make sure there is no /wp on your website, you can go with this option.

We highly recommend to back up website files and the database before proceeding.

1. File migration

Go to your website folder using FTP or File Manager:

How to move WordPress from a subfolder

Select All files > Move them to the domain document root (in our example, from public_html/wp to public_html):

How to move WordPress from a subfolder
How to move WordPress from a subfolder
Once done, go back to the domain document root to make sure all files have been moved:

How to move WordPress from a subfolder
2. Database update

You can update old URL references with the new ones in the database either using search and replace scripts or using text editors.

Below we provide the guidelines using the latter.

  • Check what database is used for your WordPress website. You can check it in the wp-config.php file located in the WordPress installation folder:

How to move WordPress from a subfolder

  • Go to cPanel > Databases section > phpMyAdmin.

 

  • Select the database in question and click on Export > Go:

How to move WordPress from a subfolder

  • The database will be downloaded to your computer. Now you need to open it and update all yourdomain.com/wp references with yourdomain.com.Once opened, click Ctrl+F and choose the tab Replace. Fill out the fields below correspondingly > Replace All:

How to move WordPress from a subfolder

  • Once done, the prompt below will display the result:

How to move WordPress from a subfolder

  • Save the updated database and exit the application.
  • Now go back to cPanel > Databases section > phpMyAdmin and select your database.
  • Check all tables using the option below and select Drop from the drop-down menu:

How to move WordPress from a subfolder

  • On the next page, confirm the actions by clicking Yes:

How to move WordPress from a subfolder

  • Once the old tables are dropped, go back and select the database > Import:

How to move WordPress from a subfolder

  • Choose the updated database from your computer files to upload > Go:

How to move WordPress from a subfolder

  • You will see a green status bar – this will indicate that the database has been successfully imported. On your right, a database tables tree will appear:

How to move WordPress from a subfolder
Go back to your website and refresh the page to check the results:

How to move WordPress from a subfolder