unknown 404 error with WHMCS & remove permalinks

I don't know what has happened and I am very confused, basically I installed whmcs integration plugin and set the page to portal, then I noticed that the WHMCS install was in the same directory as wordpress so I reinstalled it to portal.domain.tld and set it all up again, now when ever I go to domain.tld/portal a 404 error is displayed so I thought it could mean it needed the remove permalinks menu plugin installed and now all pages come up with 404, even with all plugins disabled all pages display a 404 I have spent weeks on this site I do not what to reset everything unless I truly have to :slight_frown:

  • Chris

    I am sorry to have bothered you it turns out it was something simple, in case anyone else gets the same error you need a .htaccess file in your wordpress directory with the following code.

    # BEGIN WordPress
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteRule ^index\.php$ - [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
    </IfModule>

    # END WordPress

    after that it should work

  • Alexander

    Hi @Chris,

    So both WordPress and WHMCS were installed in the same folder at the same time?

    Which was installed first? Both systems would have an index.php file, so it's likely that one was deleted during this process.

    You may be missing your WordPress index.php which could cause this. See if it exists, and if not you can get a copy from WordPress.org and upload it.

    You may end up needing to reinstall some of your WordPress files in case anything happened to them.

    Best regards,

  • Chris

    Sorry, I installed wordpress as my main site and then installed WHMCS in a separate folder "portal" because it set a slug I set that to portal and the page to portal,

    which was the main error I then installed the remove permalink plugin to see if that worked then all pages stopped working.

    I reinstalled WHMCS under portal.domain.tld and set everything up again changing the page to system and the slug to member and still no luck as all pages displayed a 404.

    After a bit of research it turned out in order to change the slug of a wordpress site you need to set up a .htaccess file to enable mod_rewrite.

    # BEGIN WordPress
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteRule ^index\.php$ - [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
    </IfModule>

    # END WordPress

    And that resolved the issue, I thought I would repost to ensure anyone who gets the issue can find it :smiley:

    Thanks for your help though love the plugin however how do I manage the admin area of WHMCS within wordpress as the plugin says it can.

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.