How to Upload Wordpress Website Using the Cpanel
How to Migrate a WordPress® Installation to a cPanel & WHM Server
Last modified: February one, 2022
Overview
This tutorial explains how to drift a macOS® server-hosted WordPress® installation to a cPanel & WHM server. This is useful, for example, If you develop your website on a locally-hosted server and wish to deploy your work to a public-facing server.
Alert:
- Your website volition likely feel downtime during this procedure.
- Because cPanel, 50.L.C. doesn't develop WordPress itself, cPanel Technical Support can't help you lot perform the migration.
Note:
Every bit of Autumn 2018, Apple® volition no longer support website hosting on macOS servers. For more than data, read Apple Back up's Prepare for changes to macOS Server documentation.
Drift your WordPress installation
Pre-migration requirements
Before yous begin, make certain that you lot possess the following:
- A domain that exists on a cPanel & WHM server.
- A File Transfer Protocol (FTP) customer and account.
Consign the WordPress database
Consign your WordPress installation's database with the phpMyAdmin tool. To do this, perform the post-obit steps:
-
Navigate to
localexample.com/phpmyadmin
, where localexample represents your locally-hosted domain. The phpMyAdmin interface will announced. -
Click Export in the toolbar. A new interface will appear.
-
Under the Export Methods: heading, select either of the post-obit export methods:
- Quick — This method displays the minimum settings.
- Custom — This method displays all possible settings.
Note:
We recommend that yous select Quick.
-
Select the database'due south format from the Format: bill of fare. This setting defaults to SQL.
-
Click Go. The system volition create a download file that contains your database information.
Upload the files to the new server
Connect to your web hosting business relationship via your preferred FTP client and upload your WordPress files to your web host business relationship'due south public_html
directory.
Create a MySQL database
Create a MySQL® database to which to import the WordPress database in cPanel's MySQL Databases interface (cPanel >> Home >> Databases >> MySQL® Databases).
Import the Wordpress database to cPanel
Import your WordPress database backup file to cPanel & WHM. To do this, perform the following steps:
- Navigate to cPanel's phpMyAdmin interface (cPanel >> Home >> Databases >> phpMyAdmin).
- Click Databases in the toolbar and then click the database that you created in the previous step.
- Click Import in the toolbar. A new interface will appear.
- Click Choose File and select the database backup file that you created in Step 1.
- Click Go. The system will import your WordPress database.
Alter the website URL
You must alter the website URL in your database so that the database connects with your WordPress site. To do this, perform the post-obit steps in cPanel's phpMyAdmin interface (cPanel >> Abode >> Databases >> phpMyAdmin):
- Locate the wp_options table and click Browse.
- Under the option_name column, locate the siteurl entry and click Edit.
- In the option_value column, enter your website's new URL in the text box and click Go.
- Locate the home entry and click Edit.
- In the setting_value column, enter your website's new URL in the text box and click Go.
Configure the WordPress database settings
You must configure your WordPress database settings to use the information for the database that y'all created in step 3. To do this, perform the following steps:
-
Navigate to cPanel's File Manager interface (cPanel >> Dwelling >> Files >> File Managing director).
-
Open the
public_html
directory and locate thewp-config.php
file. -
Right-click the
wp-config.php
file and click Edit. A pop-up window will appear. -
Click Edit in the pop-up window. The editor will appear in a new browser tab.
-
Edit the
DB_NAME
,DB_USER
, andDB_PASSWORD
lines to match the data for the database that you created in step 3. This volition resemble the following example:i ii 3 4 5 half-dozen vii 8 9 x eleven 12
// ** MySQL settings ** // /** The name of the database for WordPress */ ascertain( ' DB_NAME ', ' mrfrogor_wp ' ); /** MySQL database username */ define( ' DB_USER ', ' mrfrogor_wp ' ); /** MySQL database countersign */ define( ' DB_PASSWORD ', ' zQWDu1CdqbVx ' ); /** MySQL hostname */ ascertain( ' DB_HOST ', ' localhost ' );
-
After make your changes, click Save Changes
Update links and images
Your website may contain broken links and broken images later on you migrate your website. To update the links and images to use your new website's URL, perform the following steps:
-
Navigate to cPanel's phpMyAdmin interface (cPanel >> Home >> Databases >> phpMyAdmin).
-
Click Databases in the toolbar and and then click the database that you created in step 3.
-
Click SQL in the toolbar.
-
In the text box, enter an SQL query to update your URLs. For instance:
UPDATE wp_posts SET post_content = Supervene upon(post_content, 'localexample.com/, www.mrfrog.com/')
-
Click Go to run the query.
Save the changes in WordPress interface
Subsequently y'all updates your links and images, save the changes in the WordPress dashboard to update the URL. To exercise this, perform the following steps:
-
Log in to the WordPress dashboard.
-
Navigate to the Full general interface (Master >> Settings >> Full general).
-
Click Salve at the bottom of the interface.
-
Navigate to the Permalink interface (Main >> Settings >> Permalink).
-
Click Relieve at the bottom of the interface.
Delete your macOS website
Afterwards you complete your website's migration to a cPanel & WHM server, delete the website that remains on your macOS server.
Additional Documentation
- Account Restore
- Account Transfer
- Applications
- How to Move All cPanel Accounts from 1 Server to Another
- How to Restore Your cPanel Account - A Guide for New System Administrators
- The cPanel Glossary
cPanel, WebHost Manager and WHM are registered trademarks of cPanel, Fifty.L.C. for providing its reckoner software that facilitates the management and configuration of internet web servers.
Source: https://docs.cpanel.net/knowledge-base/transfers-and-restores/how-to-migrate-a-wordpress-installation-to-a-cpanel-server/
0 Response to "How to Upload Wordpress Website Using the Cpanel"
Post a Comment