phpmysqlmacosmampcouch-cms

Broken paths when running CouchCMS locally on macOS


For development purposes I trying to get CouchCMS working on my local macOS machine. I am running macOS High Sierra 10.13.6 with MAMP 5.1.

I have exported MySQL tables from the existing CouchCMS website and imported them to my local phpmyadmin. In my config.php file I have done the following changes:

define( 'K_SITE_URL', '' ); 
define( 'K_DB_USER', 'root' );
define( 'K_DB_PASSWORD', 'root' );
define( 'K_DB_HOST', '' );

This was the only way to view the website. When I try to access the admin page the URL gets generated in a weird way:

localhost:8888/website-directory/admin/admin/login.php

When I edit the URL to be:

localhost:8888/website-directory/admin/login.php

I can access the login page, but all the links are broken on the page, meaning that the browser can not find resources to load as the path is wrong.

How can I fix the admin URL so it is generated correctly?


Solution

  • After looking around for a possible solution I have come to this:

    // define( 'K_SITE_URL', '' );
    

    Commenting out the K_SITE_URL stops messing up all the paths including linked resources.