• Hi, I’m trying to build a new blog, WP v3.8.1 locally on MAMP.
    I haven’t worked with WP for several years, so it’s all doing my head in a bit …

    I got it installed ok, but the first thing I noticed is that it’s displaying as if there is no CSS file. The second thing I noticed is that none of the links on the page are working, anything I click on comes up with a ‘page not found’ message, I can’t even navigate to anything manually by typing in the appropriate URL, it still comes up with ‘page not found’ …
    As far as I can figure it seems to think the root directory is different to what it is – I have the root folder named ‘lalaland’, when I open the home page the url is: localhost/lalaland … but if I click on a link it’ll come up with, for example: localhost/wordpress/wp-login.php instead of localhost/lalaland/wp-login.php … if i manually type in the url as it should be it changes the root folder name to wordpress.

    On looking at the source code I saw all of the urls in there are the same which would explain why the CSS isn’t working …

    But for the life of me I cannot find where or in which file it defines what folder is the root folder to fix this.

    Can anyone help?

Viewing 4 replies - 1 through 4 (of 4 total)
  • But for the life of me I cannot find where or in which file it defines what folder is the root folder to fix this.

    There is no “file/folder” for that … you have to change that yourself from the MAMP > Preferences… > Apache > Document Root

    Why complicate things … just leave the default settings as they were when you installed MAMP ??

    Thread Starter scorpiankh

    (@scorpiankh)

    I’m not entirely sure what you mean, the MAMP settings are as they were when I installed it .. the problem is for some reason the WP files (barring the home page) seem to think the root folder is (or should be) named ‘wordpress’ instead of ‘lalaland’ as it is now …
    It’s something in the WP files defining the site root as ‘wordpress’ … I uploaded a screen shot of the source code from my home page here to illustrate my point … please note the url in the address bar underlined in green with ‘lalaland’ as the root folder, but the urls in the links in the html (underlined in red) have the root folder defined as ‘wordpress’ …

    Edit the Settings > General > Site > WordPress Address (URL) and Site Address (URL) to:

    https://localhost:8888/lalaland

    Move the complete contents of the Applications/MAMP/htdocs/wordpress folder to the lalaland folder.

    Install and run the Velvet Blues Update URLs plugin to update the links to media, etc.

    Re-save permalinks.

    Thread Starter scorpiankh

    (@scorpiankh)

    I couldn’t edit the Settings > General > Site > WordPress Address (URL) and Site Address (URL) as I couldn’t get into the admin panel because localhost:8888/lalaland/wp-login kept redirecting to localhost:8888/wordpress/wp-login and giving me a ‘page not found error because that directory doesn’t exist ….
    There never was a Applications/MAMP/htdocs/wordpress folder, it was always Applications/MAMP/htdocs/lalaland.

    But I managed to get it fixed anyways, I went into PHPmyAdmin and found the database table for options and changed the site url to localhost:8888/lalaland there directly, and it all seems to be working fine now.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Incorrect root file path after installation’ is closed to new replies.