Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

General Discussion

Is my MAMP server damaged?

I don't have the longest experience working with local servers so I wouldn't know whether it's a regular problem or not, but every time I make a new file on my computer the rest of the files stop working.

Say I need to create a new JS file for my website. As soon as I save the new file, when i edit and save the other files I'm using such as CSS, JSON, and JS( surprisingly not HTML) They just don't save the changes even though my text editor tells me otherwise. When I preview my website after changes nothing's happened.

I deal with the problem by making a new file with a similar name and changing all the file paths, but as you can guess this is getting ridiculously tedious.

I would appreciate it if anyone could help me solve this issue. Thanks in advance

Dave StSomeWhere
Dave StSomeWhere
19,870 Points

Probably not damaged...

What is your directory structure? Are you doing multiple local sites as sub directories of the default /Applications/MAMP/htdocs?

1 Answer

Well, I have my localhost directory folder inside my documents folder.....

documents/localhost/project/file.html

When I set up the directory, I though this to be the neatest thing to do. Do you think this might be the problem?

Dave StSomeWhere
Dave StSomeWhere
19,870 Points

Yes, I think it's the neatest thing and possibly your issue.

Do you bring up your site by typing localhost in the browser, or something like localhost/project? And does that match the value show in your MAMP/WebServer "document root"?

Now, since the html shows the changes, where are your js and css files/directories in relation to documents/localhost/project/file.html.

I'm asking all this because normally (using the default values) you would have a structure like:

Folder tree:
Applications
    MAMP
        htdocs
            site1 (this would be the root with the html)
                js
                css
            site2  (this would be the root with the html)
                js
                css

The in the browser you would type localhost/site1 or localhost/site2 to bring up your site and you'd be able to use relative paths to your js and css.

Does that make any sense?