How to Upload Wordpress Site to Cpanel Reddit

A cloned website is a perfect indistinguishable of a site hosted on your server. It has the same files, and the contents of its database are identical to the original. The simply difference is that the cloned site is hosted at another domain or directory.

There are many reasons you might desire to clone websites on your cPanel server. Because the copies are identical to an existing website, cloning helps deploy testing and staging sites. It'southward besides a quick style to prepare a new site using the old one as a baseline configuration. Site owners often apply cloned sites to give designers and developers access to a working environment that behaves like the live surround.

Cloning can be done on the command line, but information technology's time-consuming, and it'due south like shooting fish in a barrel to make a fault. cPanel & WHM automates the more mistake-prone steps, so y'all can rapidly clone sites based on content management systems and eCommerce applications.

This article looks at two strategies for cloning sites on your cPanel-managed server:

  1. A generic cloning process that works for nigh CMS or eCommerce sites, although nosotros will use WordPress as an example.
  2. A WordPress-specific process within WordPress Toolkit, which makes cloning a one-click job by automating copying and site configuration.

We'll start with the quickest and well-nigh convenient way to clone a WordPress site in WordPress Toolkit before exploring a more manual process that will as well work with other content management systems.

Cloning a WordPress Site with WordPress Toolkit

Open WordPress Toolkit and aggrandize the detail view for the site you lot would like to clone. Click the Clone tool in the site's dashboard.

When the clone tool opens, select a subdomain and a path to clone the site to. If they don't be, WordPress Toolkit creates them for you. When you're finished, click Start at the bottom of the page.

WordPress Toolkit automatically copies the site, creates a new database and database user, configures the site to employ the database, and creates a new subdomain if necessary. Once it's washed, you access the cloned site as usual.

You can learn more most WordPress Toolkit'southward sophisticated cloning and copying features in How to Deploy a WordPress Staging Site With cPanel or explore more than of WordPress Toolkit's many WordPress direction features.

How to Manually Clone a Website with cPanel

Content management systems—including WordPress, Joomla, and Drupal—are composed of ii primary asset types. The get-go is PHP code files and static files such every bit images, JavaScript files, and CSS. The second is information stored in the site's database—page content, configuration settings, user data, and then on.

To clone a site, we accept to copy both, so the process looks like this:

  1. Create a new binder and copy the site's files into information technology.
  2. Export the original site's database, create a new database for the clone, and import the data into information technology.
  3. Configure the clone to piece of work with the new database.

Let's see how nosotros'd employ this process to clone a WordPress site.  We're going to focus on cloning a site into a new directory rather than a subdomain.

Create a Binder and Copy the Site'southward Files

We tin create a folder for the site's clone and copy the files in File Director, which you can open from the Files section of cPanel'due south chief page menu.

  1. Select the directory containing the WordPress site you desire to clone.
  2. Click Copy in the toolbar and enter a name for the new directory. To go along things elementary, nosotros'll clone the site into a directory under public_html so that you tin can access it from a URL such as "example.com/wordpress_two."

File Manager copies the directory and all of its contents, giving you an exact duplicate of the original site'southward files.

Clone the Site's Database

Cloning the database is a little more complicated than copying files, but it'due south straightforward with cPanel's MySQL tools.

First, we create a new database.

  • Open up MySQL Databases, which you'll detect under Databases the main folio menu.
  • Enter a proper noun for the new database nether Create New Database and click the Create Database push.

Next, nosotros export the original database.  We'll use phpMyAdmin, which is also under Databases in the cPanel menu.

  1. Select the original database in the sidebar.
  2. Select the Export tab and make sure the Quick consign method is selected. The custom method lets you modify database export options, but nosotros'll stick with the defaults.
  3. Click Go.

This "dumps" the database, downloading an SQL file to your local machine with the information needed to recreate the original site's database. That's what we're going to do next, also using phpMyAdmin.

  1. Select the new database (the 1 we created in the previous department).
  2. Click the Import tab.
  3. In the File to import section, click Choose File and browse to the SQL file you just downloaded.
  4. Click the Go push at the bottom of the page.

The last step in this section is to give the database a user with a countersign. You can use an existing database user, but we'll add a new user and give them a unique password.

In cPanel, navigate to the MySQL Databases page. Scroll to the Add New User section.

  1. Under Add New User, enter a username and a stiff password.
  2. Click Create User, and and then return to the MySQL Databases page.
  3. Under Add User to Database, select the new user and the database we created in a previous section.
  4. Click Add, select "All Privileges" on the next folio, and confirm the changes.

We now accept the files and the database copied, but our cloned WordPress site is all the same configured to use the original site's database. The adjacent task is to configure the clone to employ its own database.

Edit the Cloned Site's Database and URL Configuration

This step is WordPress-specific, but you lot will have to do something like for other content direction systems.

  1. Open File Manager and select the new site's directory.
  2. Select the wpconfig.php file.
  3. Click Edit in the toolbar.

Nosotros need to edit several fields in the MySQL settings section of wpconfig.php so that WordPress tin admission and cosign with the new database.

  1. Enter the new database proper noun in the DB_NAME field.
  2. Enter the user we just created in the DB_USER field.
  3. Enter the user's password in DB_PASSWORD.

While nosotros have wp-config.php open, we can likewise tell WordPress about its new URL. There are various ways to practice this, but the quickest is to add the following lines, with appropriate changes, to the bottom of the file.

              <! – wp:paragraph – > <p>define( 'WP_HOME', 'http://example.com/wordpress_two' );</p> <! – /wp:paragraph – >  <! – wp:paragraph – > <p>define( 'WP_SITEURL', 'http://instance.com/wordpress_two' );</p> <! – /wp:paragraph – >            

Don't forget to click Salvage Changes when you're finished.

All being well, you should be able to load your cloned site at http://your_domain.com/your_subdirectory. If you've followed the examples, that will exist something like http://example.com/wordpress_two.

As e'er, if you lot have any feedback or comments, please allow united states of america know. We are here to help in the best ways nosotros can. You'll find u.s. on Discord, the cPanel forums, and Reddit. You'll find us on Discord, the cPanel forums, and Reddit. Be sure to also follow us on Facebook, Instagram, and Twitter.

orrwhict1950.blogspot.com

Source: https://blog.cpanel.com/how-to-clone-a-website-in-cpanel/

0 Response to "How to Upload Wordpress Site to Cpanel Reddit"

Post a Comment

Iklan Atas Artikel

Iklan Tengah Artikel 1

Iklan Tengah Artikel 2

Iklan Bawah Artikel