This article resulted from some recent work performed on a new website, and I have written it as a step-by-step solution.
It could save you a stack of time.
It assumes that you understand the use of FTP.
AIM 1: to create a website and to add a subdomain.
Please note: the domain, subdirectories and files in this article are imaginary, and are for instructional purposes only.
Let's use the example of a fruit grower.
Build a website fruit.
com using your FTP client software, and with the files and subdirectories as follows -
com is usually represented by /public_html/ on the server, and index.
html is the home page.
SUBDOMAIN Use the cpanel utility to 'add' a subdomain - citrus.
This means you will be creating a new folder 'citrus' which is a SPECIAL FOLDER.
Using FTP again with the username and password as before (i.
e.
you don't create a new FTP user for the subdomain), build -
html, grove.
html, and orchard.
html using your browser, the urls are -
html, or grove.
html, nor orchard.
html
It is special in that you have to access the folder in a special way.
It is not special in the way you use FTP to add content.
WORDPRESS (abbrev.
'WP') AIM 2: to install WP on the site fruit.
com, and then on the subdomain 'citrus'.
(See WordPress.
org for the installation method) On your main site - Using cpanel's utility for managing MySql databases, create a database, say, 'wp'.
It's actual full name you will see will turn out to be 'yourusername_wp'.
Create a new user, say, 'wpu'.
His actual full name will turn out to be 'yourusername_wpu'.
Connect the new user to the new database.
The actual names will be the ones to use in your WP installation when you edit your wp_config file (the 'wp_' here has nothing to do with the name you gave to your database).
Using FTP, install WP, following the installation method, on your main site fruit.
com.
You will probably install it in /public_html/, or in something like /public_html/blog/ Now for WP in your subdomain - Using cpanel's utility for managing MySql databases, create a database, say, 'ws'.
It's actual name will turn out to be 'yourusername_ws'.
Create a new user, say, 'wsu'.
His actual name will turn out to be 'yourusername_wsu'.
Connect the new user to the new database.
The actual names will be the ones to use in your WP installation when you edit your wp_config file.
Using FTP install WP, following the installation method, in your folder 'citrus'.
You will probably install it in /public_html/citrus/, or in something like /public_html/citrus/blog/ Well done! You now have a working subdomain with WordPress installed on the main domain and in the subdomain.
It could save you a stack of time.
It assumes that you understand the use of FTP.
AIM 1: to create a website and to add a subdomain.
Please note: the domain, subdirectories and files in this article are imaginary, and are for instructional purposes only.
Let's use the example of a fruit grower.
Build a website fruit.
com using your FTP client software, and with the files and subdirectories as follows -
- fruit.
com/index.
html - fruit.
com/apples/orchard.
html - fruit.
com/grapes/vineyard.
html
com is usually represented by /public_html/ on the server, and index.
html is the home page.
SUBDOMAIN Use the cpanel utility to 'add' a subdomain - citrus.
This means you will be creating a new folder 'citrus' which is a SPECIAL FOLDER.
Using FTP again with the username and password as before (i.
e.
you don't create a new FTP user for the subdomain), build -
- /public_html/citrus/index.
html (and this time it's a different index.
html) - /public_html/citrus/oranges/grove.
html - /public_html/citrus/grapefruit/orchard.
html
html, grove.
html, and orchard.
html using your browser, the urls are -
- citrus.
fruit.
com/index.
html - citrus.
fruit.
com/oranges/grove.
html - citrus.
fruit.
com/grapefruit/orchard.
html
html, or grove.
html, nor orchard.
html
- fruit.
com/citrus/index.
html - fruit.
com/citrus/oranges/grove.
html - fruit.
com/citrus/grapefruit/orchard.
html
It is special in that you have to access the folder in a special way.
It is not special in the way you use FTP to add content.
WORDPRESS (abbrev.
'WP') AIM 2: to install WP on the site fruit.
com, and then on the subdomain 'citrus'.
(See WordPress.
org for the installation method) On your main site - Using cpanel's utility for managing MySql databases, create a database, say, 'wp'.
It's actual full name you will see will turn out to be 'yourusername_wp'.
Create a new user, say, 'wpu'.
His actual full name will turn out to be 'yourusername_wpu'.
Connect the new user to the new database.
The actual names will be the ones to use in your WP installation when you edit your wp_config file (the 'wp_' here has nothing to do with the name you gave to your database).
Using FTP, install WP, following the installation method, on your main site fruit.
com.
You will probably install it in /public_html/, or in something like /public_html/blog/ Now for WP in your subdomain - Using cpanel's utility for managing MySql databases, create a database, say, 'ws'.
It's actual name will turn out to be 'yourusername_ws'.
Create a new user, say, 'wsu'.
His actual name will turn out to be 'yourusername_wsu'.
Connect the new user to the new database.
The actual names will be the ones to use in your WP installation when you edit your wp_config file.
Using FTP install WP, following the installation method, in your folder 'citrus'.
You will probably install it in /public_html/citrus/, or in something like /public_html/citrus/blog/ Well done! You now have a working subdomain with WordPress installed on the main domain and in the subdomain.
SHARE