• Resolved rosiembanks

    (@rosiembanks)


    This is the first addon domain I’ve ever worked on, and I’ve got some questions.

    Background: I have a primary domain at Hostgator.com. It is: primarydomain.com.

    There is a WordPress install in primary.com. It works just fine.

    I created an addon domain called addon.com. The document root is /public_html/addondomain.com

    Hostgator creates a subdomain when you create an addon domain. It is: primarydomain.com/addondomain/ and that is where I installed a WordPress site.

    It worked just fine while developing it. I could see the site at addondomain.primarydomain.com/ and primarydomain.com/addondomain.com/ and when I needed to log in to the Dashboard, I did it at addon.primary.com/wp-login.php.

    When it was time to bring it live, I changed the General Settings to:

    WordPress Address (URL): https://addon.primary.com
    Site Address (URL): https://addondomain.com

    When we pointed the domain name at the correct IP address, the site resolved just fine with a few small errors. Some social icon plugin graphics, for example aren’t loading. The arrows in a slideshow aren’t working… Little things like that.

    More pressing is the internal workings, which aren’t exactly right.

    For example, the gray “logged in” information bar at the top is not visible, and neither are the “edit” links that logged in users usually can see.

    And when I try to preview a post/page, I get this message: “You do not have permission to preview drafts.” So apparently my preview function isn’t working.

    Perhaps I’ve installed the site incorrectly or I need to make some adjustments, but in what way? And what else should I be looking for to fix?

    If anybody has a list of best practices when setting up WordPress installs in addon domains and would like to share, I would appreciate it. Thank you!

Viewing 10 replies - 1 through 10 (of 10 total)
  • I created an addon domain called addon.com. The document root is /public_html/addondomain.com

    While this is the default, I don’t like it, it imposes unhelpful concepts of hierarchy. I always backspace over the “public_html/” part of the name and have the website files in “/addondomain” of my hosting base dir.

    Hostgator creates a subdomain when you create an addon domain. It is: primarydomain.com/addondomain/ and that is where I installed a WordPress site.

    I don’t know why it does this (possibly helps with tracking ownership ?), I have never made use of it. Use “https://addondomain.com”, it is all you need.

    Life really is simpler if you keep the different installations independent of each other, my WordPress installs on addon domains neither know nor care that they are sharing a hosting account.

    Thread Starter rosiembanks

    (@rosiembanks)

    Thanks for the response!

    But do I actually need to reinstall WordPress do get the addon domain dashboard working properly?

    Is there something else I can do?

    Another problem: when I log in at addondomain.com/wp-login.php, it works. When I log out I’m taken to addondomain.primarydomain.com/wp-login.php?loggedout=true. But when I try logging in from that screen, the login page just reloads, with no errors.

    If you have only limited time invested in the website, then I would delete it and start again. Delete the addon domain too, then make it again with its own stand alone directory. Also delete the database.

    Do you use Installatron or other one click installer ? Or do you do a manual install ?

    Thread Starter rosiembanks

    (@rosiembanks)

    The site is live. Could I create a new domain in a stand-alone directory and a new database, recreate the site, then delete the old one? (No down time?)

    If the addondomain.com is resolving correctly now, wouldn’t it then just automatically use the new install?

    This whole addon stuff is pretty damn confusing. I Googled it to death before I started and thought I had everything covered. If you have any online resources you could point to, I’d be grateful.

    I created it with a QuickInstall script. QuickInstall allows you to specify any installation locale you choose. Thought that would be okay.

    The problem is the way CPANEL manages addon domains. You should never have used the subdomain. Instead you should only have used the addon domain name.

    Modern CPANEL installations will redirect the subdomain.primarydomain.tld to your addondomain.tld through an .htaccess redirect (this is managed through the CPANEL menu).

    You can add code to the .htaccess file to also redirect the priamarydomain.tld/addondomain folder to the addondomain.tld so that for all intents and purposes your Website is operating as a standalone domain.

    If you have the option of installing the addon domain in its own directory tree that is preferable but not every Webhost allows that.

    The SQL database may now have the wrong sub/domain information in some of the settings. You can try using PHPMyAdmin to look for the wrong domain root to resolve the problem or you can try reinstalling WordPress and just using one domain name.

    Thread Starter rosiembanks

    (@rosiembanks)

    OK, guys, I want to thank you for trying to help me.

    I got ahold of a Hostgator tech who said that while other webhosting companies allow removal of the “public_html/” part of the name, that is not how Hostgator does it. They confirmed that I had installed the addon domain correctly.

    The solution to all of the errors was very simple and located in the General Settings. This setting was incorrect:

    WordPress Address (URL): https://addondomain.primarydomain.com
    Site Address (URL): https://addondomain.com

    This is the correct setting:

    WordPress Address (URL): https://primarydomain.com
    Site Address (URL): https://addondomain.com

    Once I changed the WordPress Address URL, the site began working properly. No problems logging in, no missing preview function, and the logged-in user status bar at the top is there.

    Thanks to everyone who tried to help me. I hope this hopes someone else!

    Thread Starter rosiembanks

    (@rosiembanks)

    Marking as resolved!

    WordPress Address (URL): https://primarydomain.com
    Site Address (URL): https://addondomain.com

    That may come back to haunt you. You should be using the same domain in both settings. This setting may expose you to an eventual problem with duplicate content.

    I am glad you have it working.

    It is my belief that these settings are better, your addon domain need know nothing about the primary:
    WordPress Address (URL): https://addondomain.com
    Site Address (URL): https://addondomain.com

    Thread Starter rosiembanks

    (@rosiembanks)

    Holy smokes, Ross and sffandom! I can’t believe I did that! That was a typo/error on my part in my hurry to show the world that I got the problem solved.

    Of course, you are right. That is what I have in my General Settings, not what I listed above.

    Hope I haven’t misled anyone.

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘WordPress install in addon domain’ is closed to new replies.