Yearly Archive December 28, 2018

ByJUJU-dev

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!

ByJUJU-dev

How to work with scripts in Softaculous

Softaculous is a popular web-based application installer that allows you to easily install and manage various scripts, including WordPress, Joomla, Drupal, and many others. Here’s a step-by-step guide on how to work with scripts in Softaculous:

Step 1: Log in to your cPanel

To access Softaculous, you’ll need to log in to your cPanel account. If you’re not sure how to do this, you can refer to your hosting provider’s documentation or contact their support team.

Step 2: Navigate to Softaculous

Once logged in, click on the “Softaculous” icon in the cPanel dashboard. This will take you to the Softaculous interface.

Step 3: Search for a script

In the Softaculous interface, click on the “Script” tab and search for the script you want to install. You can search by keyword, category, or browse through the list of available scripts.

Step 4: Choose a script version

Once you’ve found the script you want to install, click on it to view more information. You’ll see a list of available versions, along with a brief description and installation instructions.

Step 5: Install the script

To install the script, click on the “Install” button. You’ll be prompted to enter some basic information, such as:

  • Site name
  • Site email
  • Database name
  • Database username
  • Database password

Enter the required information and click “Install” to begin the installation process.

Step 6: Configure the script

After installation, you’ll be taken to the script’s configuration page. Here, you can set up various settings, such as:

  • Administrator username and password
  • Database settings
  • Theme selection (for WordPress and other themes)
  • Configuration options (e.g., language, timezone)

Make sure to configure the script according to your needs and preferences.

Step 7: Access your script

Once the installation is complete, you can access your script by clicking on the “View Details” button next to the installed script. This will take you directly to your script’s login page.

Common tasks in Softaculous

Here are some common tasks you can perform in Softaculous:

  • Update scripts: To update your installed scripts to the latest version, navigate to the “Scripts” tab, find the script you want to update, and click on the “Update” button.
  • Backup scripts: To create a backup of your installed scripts, navigate to the “Backups” tab and click on the “Backup” button.
  • Delete scripts: To delete an installed script, navigate to the “Scripts” tab, find the script you want to delete, and click on the “Delete” button.
  • Clone scripts: To create a copy of an installed script, navigate to the “Scripts” tab, find the script you want to clone, and click on the “Clone” button.

By following these steps and understanding these common tasks, you’ll be able to easily work with scripts in Softaculous and manage your web applications with ease.

ByJUJU-dev

How to create and restore backups in cPanel

Creating and restoring backups in cPanel is a crucial step in ensuring the safety and security of your website and data. Here’s a step-by-step guide on how to create and restore backups in cPanel:

Creating Backups in cPanel:

  1. Log in to your cPanel account.
  2. Click on the “Files” section and then click on the “Backup” icon.
  3. Click on the “Home Directory” button to create a full backup of your website’s files.
  4. You can also choose to backup individual folders or files by selecting the relevant options.
  5. Set the backup destination by choosing from the available options, such as “Remote FTP Server” or “Local Disk”.
  6. Choose the compression level and format for the backup file.
  7. Click the “Generate Backup” button to start the backup process.

Restoring Backups in cPanel:

  1. Log in to your cPanel account.
  2. Click on the “Files” section and then click on the “Backup” icon.
  3. Click on the “Restore” button next to the backup you want to restore.
  4. Choose the restore method:
    • “Home Directory”: Restore the full website backup.
    • “Specific Directory”: Restore a specific folder or file.
    • “Database”: Restore a database backup.
  5. Select the backup file from your local computer or a remote server (if you stored it there).
  6. Choose the overwrite option: “Overwrite files in place” to replace existing files or “Create new directories” to create new directories.
  7. Click the “Restore” button to start the restoration process.

Additional Tips:

  • Regularly schedule backups to ensure you have recent copies of your data.
  • Store backups offsite (e.g., Google Drive, Dropbox, or an external hard drive) to ensure they are safe from local disasters or theft.
  • When restoring a backup, be cautious not to overwrite important files or data.
  • Consider using incremental backups, which only back up changed files since the last full backup, to reduce storage space usage.

cPanel Backup Settings:

  1. To change your default backup settings, go to the “Files” section and click on the “Backup Settings” icon.
  2. Set up your preferred backup frequency (daily, weekly, or monthly) and choose which directories or files you want to include in your backups.

By following these steps, you’ll be able to create and restore backups in cPanel with ease, ensuring your website and data are safe and secure.

ByJUJU-dev

Reseller Hosting – Getting Started

Congratulations on choosing cPanel Reseller Hosting! Here’s a step-by-step guide to help you get started:

Step 1: Sign up for an account

  1. Go to the cPanel website (www.cpanel.net) and click on “Reseller Hosting”.
  2. Fill out the sign-up form with your details, including your name, email address, and password.
  3. Choose your hosting plan and payment method.
  4. Review the terms and conditions, then click “Sign up” to complete the registration process.

Step 2: Set up your reseller account

  1. Log in to your cPanel account using your username and password.
  2. Click on “Reseller” > “Account Information” to set up your reseller account.
  3. Fill out the required information, including your name, email address, and contact details.
  4. Set up your billing information and payment method.
  5. Click “Save” to save your changes.

Step 3: Create your first package

  1. Click on “Reseller” > “Packages” to create a new package.
  2. Choose the package type (e.g., Shared, Semi-Dedicated, or VPS) and select the resources you want to allocate to each package.
  3. Set the pricing for each package and choose the billing cycle (e.g., monthly or annually).
  4. Click “Create” to create the package.

Step 4: Create a client account

  1. Click on “Reseller” > “Clients” to create a new client account.
  2. Fill out the client’s information, including their name, email address, and contact details.
  3. Assign the client to one of your packages (created in Step 3).
  4. Click “Create” to create the client account.

Step 5: Create a new domain

  1. Click on “Domains” > “Manage Domains” to create a new domain.
  2. Enter the domain name you want to create (e.g., example.com).
  3. Choose the domain extension (e.g., .com, .net, .org) and set the nameservers.
  4. Set up any additional settings (e.g., IP address, DNS records).
  5. Click “Create” to create the domain.

Step 6: Set up cPanel access

  1. Log in to your cPanel account as a reseller.
  2. Click on “Reseller” > “Client Access” to grant access to your clients.
  3. Assign each client to their respective package and grant them access to their own cPanel account.
  4. Provide each client with their login credentials (username and password).

Additional Tips:

  • Make sure you have sufficient resources (e.g., disk space, bandwidth) allocated for each package.
  • Monitor your clients’ usage regularly to ensure they don’t exceed their allocated resources.
  • Use cPanel’s built-in tools (e.g., WHMCS) to manage your clients’ accounts and invoices.

By following these steps, you’ll be well on your way to setting up a successful cPanel Reseller Hosting business

ByJUJU-dev

What is the difference between shared hosting and VPS?

What is the difference between shared hosting and VPS?

What is the difference between shared hosting and VPS?
It is the same difference as between a dedicated server and usual shared hosting.

With a VPS, you receive all the power of dedicated hosting with the ability to have your own set of services and customizable disk space. With shared hosting, you have limited administrative access and can’t customize software configurations, while with a VPS you can perform any actions from your control panel and don’t need to contact technical support with every single request.

Shared hosting and Virtual Private Server (VPS) are two types of web hosting services that cater to different needs and requirements. Here’s a brief comparison of the two:

Shared Hosting:

  • Shared hosting is a type of web hosting where multiple websites share the same physical server and its resources.
  • Each website is hosted on a single server, and resources such as CPU, memory, and disk space are shared among all websites.
  • Shared hosting is suitable for small to medium-sized websites with moderate traffic.
  • It’s often less expensive than VPS hosting, with prices starting from around $5-10 per month.
  • Shared hosting plans usually come with limitations, such as:
    • Limited storage space
    • Limited bandwidth
    • Limited CPU resources
    • Limited scalability
    • Shared resources can lead to slower performance

Virtual Private Server (VPS):

  • VPS is a type of virtualization technology that partitions a physical server into multiple virtual servers, each with its own dedicated resources.
  • Each VPS is a virtualized server, running its own operating system, with dedicated CPU, memory, and storage.
  • VPS hosting is suitable for medium to large-sized websites with high traffic or resource-intensive applications.
  • It’s often more expensive than shared hosting, with prices starting from around $20-50 per month.
  • VPS plans usually offer:
    • Dedicated resources (CPU, memory, storage)
    • Better performance and scalability
    • Root access to the server
    • More control over server settings and configurations
    • Flexibility to upgrade or downgrade plans as needed

Key differences:

  1. Resource allocation: Shared hosting shares resources among multiple websites, while VPS provides dedicated resources for each virtual server.
  2. Performance: VPS typically offers better performance due to dedicated resources, while shared hosting may experience slower performance due to resource sharing.
  3. Scalability: VPS allows for easier scalability by upgrading or downgrading plans as needed, while shared hosting may require migration to a different plan or server.
  4. Control: VPS provides root access to the server, giving you more control over server settings and configurations, while shared hosting typically has limited control options.
  5. Cost: Shared hosting is often less expensive than VPS hosting.

When deciding between shared hosting and VPS, consider the following factors:

  • Your website’s traffic and resource requirements
  • Your budget
  • The level of control and customization you need
  • The scalability requirements for your website

If your website has moderate traffic and resource requirements, shared hosting might be sufficient. However, if you need more control, dedicated resources, and scalability, VPS might be a better option.

ByJUJU-dev

Why should I choose VPS hosting?

Why should I choose VPS hosting?Why should I choose VPS hosting?

Virtual Private Server is the right choice for developers, webmasters, resellers and simply for those who run resource-intensive websites. We use KVM and VMware technologies for virtualization, that is why each VPS performs and executes exactly like an independent physical machine and therefore offers security and flexibility for your sites, independence from neighbors, full control over your hosting environment and power of a dedicated server at an affordable price. KVM delivers 133% increase in disk speed performance comparing to XEN technology. Both KVM and VMware VPSs has got their own customers, and we respect all those customers.

 

ByJUJU-dev

What is a VPS?

What is a VPS?

What is a VPS?

With a VPS, you open a world of possibilities that would not be possible on shared hosting because of restrictions.

VPS stands for Virtual Private Server. This refers to the partitioning of a physical server into multiple servers. In effect, each one acts just like a dedicated server, you get all the features of a dedicated server but at a lower price. Each VPS has its own operating system, and each can be rebooted separately. These operating systems each receive a specific share of the resources of the physical server, no more and no less, they are isolated from each other so that one cannot interfere with another. If one VPS experiences problems or tries to use too much memory or CPU resources, it has no effect on the others.

There are many advantages to selecting a VPS, it costs less than a fully dedicated server and provides a great deal of freedom and flexibility over the limitations and restrictions of shared hosting. You are limited only by the capabilities of the VPS, so select one powerful enough to meet your needs. You can always upgrade later if you decide it becomes necessary.

As for virtualization technologies we offer KVM VPS servers.

Since you are supposed to manage your VPS yourself, we recommend you have a good understanding of Linux commands and are familiar with the WHM/cPanel control panel. You can get a VPS without WHM/cPanel, but in this case, you would need to have very advanced knowledge of Linux.

If you don’t feel you have the technical expertise necessary to manage your own VPS, there is no need to let that stop you – you can select full management for an additional fee.

You won’t have root access, and it will act much like a shared hosting plan, but you will still make the decisions.

cPanel is required if you choose full management for a VPS.

ByJUJU-dev

How to log in to WordPress using Softaculous

How to log in to WordPress using Softaculous

Softaculous allows you to install and manage WordPress in a few clicks. It is not just easy to install programs by using it, it is a big time saver because it automates many tasks related to software installation. In this guide, we will show you how to log in to a website’s dashboard using Softaculous.

1. Log in to your cPanel account:

How to log in to WordPress using Softaculous
2. Scroll to the bottom of the page, find ‘Softaculous App Installer’ and click the WordPress icon:
How to log in to WordPress using Softaculous

3. Navigate to All Installations menu:

How to log in to WordPress using Softaculous

4. When working with a CMS, you’ll generally need to log in to it as an Administrator. In order to proceed, click the Admin icon:

How to log in to WordPress using Softaculous

You are in. Feel free to manage your website!

ByJUJU-dev

How to reset WordPress admin password

How to reset WordPress admin password

There are three ways to reset a lost WordPress dashboard password:

Using the Lost Password option
Using Softaculous Apps installer
In the database

Using the Lost Password option

1. Open your WordPress administrative login page – it is usually located in http://yourdomain.com/wp-admin.

2. Click on the Lost your password? option, fill out the username or email address > Get New Password:

How to reset WordPress admin password

How to reset WordPress admin password

3. Log into your email account, which is set as your administrative WordPress contact. You can find the email message with the password reset URL there, click on it:
How to reset WordPress admin password

4. Enter your new strong password twice on the opened page > Reset password:

How to reset WordPress admin password

Using Softaculous Apps installer

In order to change the password for your WordPress admin user, follow next steps:

1. Log into cPanel and navigate to Softaculous Apps Installer menu:

How to reset WordPress admin password

2. In the Softaculous interface find All Installations icon in the top right corner:

How to reset WordPress admin password

3. In this menu you will see Scripts Installations list. Select the one you need to change the admin password for and click on Edit Details (pencil icon) next to it:

How to reset WordPress admin password

4. Next you will see installation details page. Scroll down to Admin Account section. Here you need to enter your current username and the new password in Admin Password field:

How to reset WordPress admin password

5. Once done, scroll down to the bottom of the page and hit Save installation details button:

How to reset WordPress admin password

6. After that you will receive the message about the successful update:

How to reset WordPress admin password

Feel free to log in to WordPress admin panel using the new password.

Reset the password via the database

If Lost your password? confirmation emails do not arrive, or if you have no access to the email account linked to your administrative dashboard, you can reset your password via MySQL database:

1. Log into your cPanel > section Files File manager and navigate to the document root of your WordPress website:

How to reset WordPress admin password

2. To check what database is used for your WordPress website, open the wp-config.php file located in:

How to reset WordPress admin password

3. Go to cPanel > Databases section > phpMyAdmin:

How to reset WordPress admin password

4. Select the database in question, table wp-users and click on Edit next to the admin user:

How to reset WordPress admin password

5. On the next page, type in your new strong password into the user_pass box, select MD5 in the Function column and click Go:

How to reset WordPress admin password

You can now go back to the WordPress dashboard page and try to log in with the new password.

 

ByJUJU-dev

How to move WordPress from a subfolder

Moving WordPress from a subfolder to the root directory of your website can be a bit complex, but it’s a straightforward process if you follow these steps:

Step 1: Backup your site

Before making any changes, it’s essential to backup your website. This will ensure that you have a copy of your site’s files and database in case something goes wrong during the migration process.

Step 2: Change the WordPress address

In the wp-config.php file, update the WP_HOME and WP_SITEURL constants to point to the new root directory. You can do this by adding the following lines at the top of the file:

define('WP_HOME', 'http://example.com');
define('WP_SITEURL', 'http://example.com');

Replace http://example.com with your website’s root URL.

Step 3: Update the database

You’ll need to update the database to reflect the new root directory. You can do this by running the following SQL query:

UPDATE wp_options SET option_value = replace(option_value, 'http://www.example.com/subfolder/', 'http://www.example.com/') WHERE option_name = 'home' OR option_name = 'site_url';

Replace http://www.example.com/subfolder/ with your current site URL and http://www.example.com/ with your new root URL.

Step 4: Update theme files

You’ll need to update any theme files that contain hard-coded URLs pointing to the subfolder. You can use a find-and-replace tool or manually search for these instances.

Step 5: Move files

Move all files from the subfolder to the root directory. Make sure to preserve the directory structure and file names.

Step 6: Update .htaccess file

Update the .htaccess file to point to the new root directory. You can do this by adding the following lines:

RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_URI} !^/subfolder [NC]
RewriteRule ^(.*)$ /subfolder/$1 [L]

This will redirect any requests from the old subfolder URL to the new root URL.

Step 7: Test your site

After moving your site, test it thoroughly to ensure everything is working as expected. Check that all pages, posts, and images are displaying correctly.

Additional tips

  • Make sure to update any plugins or themes that rely on hard-coded URLs.
  • If you’re using a caching plugin, clear the cache after moving your site.
  • Consider updating your DNS settings if you’re changing your domain name.

By following these steps, you should be able to successfully move your WordPress site from a subfolder to the root directory. If you encounter any issues or have further questions, feel free to ask!