• 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 https://www.<mydomain>.co.uk/index.php
    Am I barking up the wrong tree?

    • This topic was modified 7 years, 9 months ago by pinnerite.
Viewing 15 replies - 1 through 15 (of 30 total)
  • 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 7 years, 9 months ago by leejosepho.
    Thread Starter pinnerite

    (@pinnerite)

    Thank you.
    So when I key in https://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

    (@pinnerite)

    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?

    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 7 years, 9 months ago by leejosepho.
    • This reply was modified 7 years, 9 months ago by leejosepho.
    • This reply was modified 7 years, 9 months ago by leejosepho.
    • This reply was modified 7 years, 9 months ago by leejosepho.
    Thread Starter pinnerite

    (@pinnerite)

    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.

    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

    (@pinnerite)

    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?

    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

    • This reply was modified 7 years, 9 months ago by leejosepho.
    Thread Starter pinnerite

    (@pinnerite)

    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.

    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 7 years, 9 months ago by leejosepho.
    Thread Starter pinnerite

    (@pinnerite)

    Thanks for responding.

    Yes by domestic machine, I meant the local machine from which I access my domain.
    My web site is:

    https://www.asandco.co.uk

    That link goes to your non-WordPress site at your domain, so the link that would be helpful here would be https://www.asandco.co.uk/blog/ or https://www.asandco.co.uk/wordpress/ or whatever that might be where your WordPress folders and files are located. At that point, something such as https://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 7 years, 9 months ago by leejosepho.
    Thread Starter pinnerite

    (@pinnerite)

    At Nativespace the WordPress files are situated on /public_html along with those for my website.

    https://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.

    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

    (@pinnerite)

    Thank you. I’ll do as you suggest.

Viewing 15 replies - 1 through 15 (of 30 total)
  • The topic ‘Using existing domain’ is closed to new replies.