• charlestonplantworks234

    (@charlestonplantworks234)


    I have multiple directories on my root directly at my hosting company. One directory is “company” and the current live domain is http://www.company.com. A second directory is “testsite_company” and my test domain is a subdomain at http://www.testsite.company.com. Previous to WordPress, I used Dreamweaver and would work on the test website. After completing updates on the test site, I would ftp the files from my test website directory “testsite_company” to the live website directory “company”.

    Now I have created a brand new website with WordPress including SEO optimization via Yoast. This directory is “wordpress_company” and also located at the same hosting company as my live site. The subdomain is http://www.wordpress.company.com. I did a manually install of WordPress at my hosting company.

    I need to have my main domain work with the new WordPress site. As a test, I would like to have the subdomain http://www.testsite.company.com point to the new WordPress site. Then I would like to have my main domain http://www.company.com point to the WordPress site.

    I am also unclear if I need to do any redirects or changes to the htaccess and wp-config files.

    I am new to WordPress and would appreciate any advice from more experienced users. Thanks!

Viewing 4 replies - 1 through 4 (of 4 total)
  • Previous to WordPress, I used Dreamweaver and would work on the test website. After completing updates on the test site, I would ftp the files from my test website directory “testsite_company” to the live website directory “company”.

    With WordPress, there is more to do. You can use FTP to copy the content of your /wp-content/ folder to its new destination, but then you must also copy the matching database to that destination and then update it to recognize and use the proper URL.

    As a [practice run], I would like to have the subdomain http://www.testsite.company.com point to the new WordPress site.

    Are you able to assign it to a different location? If so, I believe you would then only have to update the database to accept that different URL.

    Then I would like to have my main domain http://www.company.com point to the WordPress site.

    Same thing unless it is a Primary domain you cannot re-assign, and then you would either have to slip WordPress in underneath it as I had first mentioned or use htaccess to redirect the domain to a subfolder and then update the database to recognize and use that URL.
    https://my.bluehost.com/cgi/help/347#redirect

    Thread Starter charlestonplantworks234

    (@charlestonplantworks234)

    I did a test on the subdomain. At my web host, I selected manage domains. I then changed the directory the subdomain points to. I made http://www.testsite.company.com point to the “wordpress_company” directory.

    The home page works correctly at http://www.testsite.company.com. If I manually type in the other pages in the address bar such as http://www.testsite.company/services.com it also works correctly. But when I click on the menu bar at the top of the page it goes to http://www.wordpress.company.com for all subpages (not home page).

    I went to settings/general settings in the wordpress dashboard. Do I need to change the WordPress URL and/or site URL?

    Do I need to make other database changes? Thanks.

    I went to settings/general settings in the wordpress dashboard. Do I need to change the WordPress URL and/or site URL?

    Yes, but I do not know exactly what to suggest you do there. One of those boxes tells your database what to expect coming in and what to send out for other incoming URLs (various pages and such), and the other tells WordPress where to find itself (your installation and /wp-content/ folder). Here is how I do that via wp-config.php, and also the related Codex:
    https://wordpress.org/support/topic/advice-on-transferring-subdomain-to-main-url-please?replies=17#post-6419785
    http://codex.wordpress.org/Moving_WordPress

    Do I need to make other database changes?

    At least in theory, the above should take care of everything. However, I have yet to not also have to manually update one or more URLs at least in my older databases.

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘Move wordpress to main domain’ is closed to new replies.