Title: Using existing domain
Last modified: February 3, 2017

---

# Using existing domain

 *  [pinnerite](https://wordpress.org/support/users/pinnerite/)
 * (@pinnerite)
 * [9 years, 3 months ago](https://wordpress.org/support/topic/using-existing-domain-2/)
 * I wanted to set up a blog on my website, to be accessible by something like /
   blog.
    All the files were uploaded to public_html as instructed. I then realised
   that I had both index.html (the original) and index.php in the same folder. I
   am considering moving all the WordPress files to a subfolder as I cannot seem
   to get any response from trying [http://www.<mydomain>.co.uk/index.php](http://www.<mydomain>.co.uk/index.php)
   Am I barking up the wrong tree?
    -  This topic was modified 9 years, 3 months ago by [pinnerite](https://wordpress.org/support/users/pinnerite/).

Viewing 15 replies - 1 through 15 (of 30 total)

1 [2](https://wordpress.org/support/topic/using-existing-domain-2/page/2/?output_format=md)
[→](https://wordpress.org/support/topic/using-existing-domain-2/page/2/?output_format=md)

 *  [leejosepho](https://wordpress.org/support/users/leejosepho/)
 * (@leejosepho)
 * [9 years, 3 months ago](https://wordpress.org/support/topic/using-existing-domain-2/#post-8734511)
 * You can have index.html and index.php in the same folder and still access either,
   and you can use htaccess to make either of those default when either is not part
   of the address in the browser. If you do move your WordPress to a sub-folder 
   and still want to be able to access index.html in “root”, then I believe the 
   sub-folder name will always need to show in the browser address bar.
    -  This reply was modified 9 years, 3 months ago by [leejosepho](https://wordpress.org/support/users/leejosepho/).
 *  Thread Starter [pinnerite](https://wordpress.org/support/users/pinnerite/)
 * (@pinnerite)
 * [9 years, 3 months ago](https://wordpress.org/support/topic/using-existing-domain-2/#post-8734605)
 * Thank you.
    So when I key in [http://www.<mydomain&gt](http://www.<mydomain&gt);.
   co.uk/wp-admin I should be getting a login page but I do not get any meaningful
   response.
 * It seems something must be wrong with my edits to wp-config.php. I will double-
   check cPanel before coming back.
 *  Thread Starter [pinnerite](https://wordpress.org/support/users/pinnerite/)
 * (@pinnerite)
 * [9 years, 3 months ago](https://wordpress.org/support/topic/using-existing-domain-2/#post-8734827)
 * I think the problem is most likely to be that I may not have the database server
   name entered correctly.
 * At DB_HOST I had entered my machine’s hostname.
 * I just checked it at $hostname
 * Should there be more to it than this?
 *  [leejosepho](https://wordpress.org/support/users/leejosepho/)
 * (@leejosepho)
 * [9 years, 3 months ago](https://wordpress.org/support/topic/using-existing-domain-2/#post-8735020)
 * Here is an example from one of my own wp-config.php files:
 *     ```
       /** Select MySQL Database **/
       define('DB_NAME', 'mydbname');
       define('DB_USER', 'mydbuser');
       define('DB_PASSWORD', 'mydbpassword');
       /*
       ** MySQL hostname */
       define('DB_HOST', 'localhost');
       /* Database Charset */
       define('DB_CHARSET', 'utf8');
       ```
   
 * The database name, user and password must match whatever is in place at your 
   server, and ‘localhost’ is all I have ever used anywhere. Then further on in 
   wp-config.php is where you must have the table_prefix for your database:
 *     ```
       /** Database Table_Prefix **/
       $table_prefix = 'whateveritis_';
       ```
   
    -  This reply was modified 9 years, 3 months ago by [leejosepho](https://wordpress.org/support/users/leejosepho/).
    -  This reply was modified 9 years, 3 months ago by [leejosepho](https://wordpress.org/support/users/leejosepho/).
    -  This reply was modified 9 years, 3 months ago by [leejosepho](https://wordpress.org/support/users/leejosepho/).
    -  This reply was modified 9 years, 3 months ago by [leejosepho](https://wordpress.org/support/users/leejosepho/).
 *  Thread Starter [pinnerite](https://wordpress.org/support/users/pinnerite/)
 * (@pinnerite)
 * [9 years, 3 months ago](https://wordpress.org/support/topic/using-existing-domain-2/#post-8735599)
 * I always change my hostname so as to identify every machine on my LAN so that
   is not the cause of my problem.
    The table_prefix is the default -> wp_
 * I have checked and triple-checked the other entries,I think the time has come
   to raise the issue with my hosting provider Nativespace.
    Presumably it is their
   MySql server and that my have issues at the moment.
 *  [citra](https://wordpress.org/support/users/citra/)
 * (@citra)
 * [9 years, 3 months ago](https://wordpress.org/support/topic/using-existing-domain-2/#post-8735938)
 * So did go through the actual install process on the root directory? Just asking
   since you mentioned that you wanted to move the installation to /blog.
 * Also what message are you seeing when you go to /wp-admin?
 *  Thread Starter [pinnerite](https://wordpress.org/support/users/pinnerite/)
 * (@pinnerite)
 * [9 years, 3 months ago](https://wordpress.org/support/topic/using-existing-domain-2/#post-8738097)
 * No the install process was handled via me as the user.
 * Since you confirmed that I need not move the files to a separate folder I left
   them on my hosting provider’s /public_html folder.
 * When I go to my domain’s /wp-admin from Google I get an apparently random return
   from a Google search.
 * However, something niggles me. When I accessed MySQL to create the database it
   was handled via cPanel which would be addressing the facilities allocated to 
   me by Nativespace and not MySQL on my demestic machine. Indeed at this stage 
   I do not even have MySQL (or MariaDB) installed on my machine. So what is DB_HOST
   supposed to be pointing to? What is its purpose?
 *  [leejosepho](https://wordpress.org/support/users/leejosepho/)
 * (@leejosepho)
 * [9 years, 3 months ago](https://wordpress.org/support/topic/using-existing-domain-2/#post-8738126)
 * Are you trying to make a local installation (your own machine) or an installation
   at your host (an online server)? If you are trying to make your local machine
   into an online server, you would need to begin there and then later add WordPress.
 * Edit: If you are trying to make a local installation, here is the simplest way:
   [https://www.apachefriends.org/index.html](https://www.apachefriends.org/index.html)
    -  This reply was modified 9 years, 3 months ago by [leejosepho](https://wordpress.org/support/users/leejosepho/).
 *  Thread Starter [pinnerite](https://wordpress.org/support/users/pinnerite/)
 * (@pinnerite)
 * [9 years, 3 months ago](https://wordpress.org/support/topic/using-existing-domain-2/#post-8738832)
 * No my existing domain is hosted on Nativespace. It is to /public_html on my section
   of their server to which I have uploaded the WordPress files.
 * For DB_HOST I have tried assigning ‘albury.asandco’ (my machine’s hostname but
   have since switched to ‘localhost’. Neither produce anything different. I certainly
   cannot get a login panel.
 * Although I can access my website at the moment, I cannot access Nativespace in
   order to seek advice from them. Neither the .com or .co.uk sites.
 *  [leejosepho](https://wordpress.org/support/users/leejosepho/)
 * (@leejosepho)
 * [9 years, 3 months ago](https://wordpress.org/support/topic/using-existing-domain-2/#post-8739003)
 * I am no expert at all of this, but I have several domains working at my online
   host and I also have just copied one site into Xampp and have it running on my
   local machine. Overall, here is where I do not understand what you are trying
   to do:
 * > When I accessed MySQL to create the database it was handled via cPanel which
   > would be addressing the facilities allocated to me by Nativespace and not MySQL
   > on my domestic machine. Indeed at this stage I do not even have MySQL (or MariaDB)
   > installed on my machine. So what is DB_HOST supposed to be pointing to? What
   > is its purpose?
 * What do you mean by “domestic machine”? I hear that as your “local machine” there
   at home or in your office or wherever, and there is no reason for it to be involved
   in any of this other than for using its browser and editors to access and fix
   or customize the site at your online host. Also, a link to your site would be
   helpful here.
    -  This reply was modified 9 years, 3 months ago by [leejosepho](https://wordpress.org/support/users/leejosepho/).
 *  Thread Starter [pinnerite](https://wordpress.org/support/users/pinnerite/)
 * (@pinnerite)
 * [9 years, 3 months ago](https://wordpress.org/support/topic/using-existing-domain-2/#post-8740535)
 * Thanks for responding.
 * Yes by domestic machine, I meant the local machine from which I access my domain.
   
   My web site is:
 * [http://www.asandco.co.uk](http://www.asandco.co.uk)
 *  [leejosepho](https://wordpress.org/support/users/leejosepho/)
 * (@leejosepho)
 * [9 years, 3 months ago](https://wordpress.org/support/topic/using-existing-domain-2/#post-8740845)
 * That link goes to your non-WordPress site at your domain, so the link that would
   be helpful here would be `http://www.asandco.co.uk/blog/` or `http://www.asandco.
   co.uk/wordpress/` or whatever that might be where your WordPress folders and 
   files are located. At that point, something such as `http://www.asandco.co.uk/
   wordpress/wp-admin/` should get you to a login page if you already have a working
   installation. Also, your local machine does not need anything related to WordPress.
   WordPress simply processes and fulfills browser requests for site content from
   its database and wp-content folders and files.
    -  This reply was modified 9 years, 3 months ago by [leejosepho](https://wordpress.org/support/users/leejosepho/).
 *  Thread Starter [pinnerite](https://wordpress.org/support/users/pinnerite/)
 * (@pinnerite)
 * [9 years, 3 months ago](https://wordpress.org/support/topic/using-existing-domain-2/#post-8741070)
 * At Nativespace the WordPress files are situated on /public_html along with those
   for my website.
 * [http://www.asandco.co.uk/wp-admin/](http://www.asandco.co.uk/wp-admin/)
 * gets me to a logon screen for a new installation (it wasn’t even doing that yesterday)
   but I had already created the first part including activating mysql via cPanel.
 *  [leejosepho](https://wordpress.org/support/users/leejosepho/)
 * (@leejosepho)
 * [9 years, 3 months ago](https://wordpress.org/support/topic/using-existing-domain-2/#post-8741305)
 * You can either edit wp-config.php to use the database WordPress cannot presently
   find or simply complete that installation and then change the database later…
   and that is what I would likely do.
 *  Thread Starter [pinnerite](https://wordpress.org/support/users/pinnerite/)
 * (@pinnerite)
 * [9 years, 3 months ago](https://wordpress.org/support/topic/using-existing-domain-2/#post-8741598)
 * Thank you. I’ll do as you suggest.

Viewing 15 replies - 1 through 15 (of 30 total)

1 [2](https://wordpress.org/support/topic/using-existing-domain-2/page/2/?output_format=md)
[→](https://wordpress.org/support/topic/using-existing-domain-2/page/2/?output_format=md)

The topic ‘Using existing domain’ is closed to new replies.

 * In: [Installing WordPress](https://wordpress.org/support/forum/installation/)
 * 30 replies
 * 3 participants
 * Last reply from: [leejosepho](https://wordpress.org/support/users/leejosepho/)
 * Last activity: [9 years, 3 months ago](https://wordpress.org/support/topic/using-existing-domain-2/page/2/#post-8797067)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
