Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums Back End development and production websites confusion

  • This topic is empty.
Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #35675
    D3mon
    Member

    I’m new to having a local copy of a website with MAMP and uploading any changes to the production site (using Coda).
    I’m struggling on how I prevent specific local settings (DB, local path etc.) in my PHP files overwriting the production server settings and crashing it?
    I’d rather not have to publish a config file to the production site, then go have to update all the settings again for the production environment, but can only guess I have to do it?

    #92893
    D3mon
    Member

    Thanks. Yes I had been using the relative paths for the images, which was lucky but I’ve found that I have some problems with the $_SERVER, that I use to reference some resources outside of the web root, being unavoidably very different on both locations.

    It was hardcoded when I worked only remotely on the site, but now I find I need to set it for the development site in my config file, then upload to production, then re-edit remotely to fix it for the new server.

    #92894
    davidlab.be
    Participant

    are you using WordPress?

    #92895
    D3mon
    Member

    No, bespoke sites.

    #92912
    D3mon
    Member

    Great, thanks guys. I like to keep my sites as ‘portable’ as possible, so as they could be picked up from one host and dropped onto another with very little fuss/downtime etc. I’ve spent years just working on them ‘live’, but trying to take a more considered approach now with development/production stages. :D

Viewing 5 posts - 1 through 5 (of 5 total)
  • The forum ‘Back End’ is closed to new topics and replies.