Grow your CSS skills. Land your dream job.

Setting up a local testing server (WAMP) with Sublime Text

  • # March 5, 2012 at 7:18 am

    I am finally giving DW the boot and trying Sublime Text as recommended by loads of people here. However, I don’t know the steps to connect to WAMP and need some help establishing a local server with Sublime Text. Any help appreciated!

    # March 5, 2012 at 8:44 am

    Hey,
    I personally recommend XAMPP for it’s simplicity
    http://www.apachefriends.org/en/xampp.html
    Once you get your WAMP set up you can just open the folder of your document root with ST2

    # March 5, 2012 at 8:48 am

    What Karl said – this is how I have it setup. I run XAMPP on my networked Windows 7 machine and then code via Sublime Text 2 on my mac, simply opening the htdocs folder over the network, this allows “live” testing and saving across.

    Sure it’s not as simple as FTP via Dreamweaver but, I’d recommend using an FTP program like Filezilla (free) any day of the week.

    # March 5, 2012 at 8:49 am

    Hey Karl – thanks for this. I will give it a whirl. I want to see if I have more luck than with DW.

    # March 5, 2012 at 9:19 am

    I am little confused – why run WAMP and XAMPP?

    Also both are trying to run from the same socket so Xammp isn’t working.

    # March 5, 2012 at 10:03 am

    @karlpcrowley or @andy_unleash – ok, got xampp working (sorry about above – i switched off wamp) and placed the relevant files into the htdocs folder in xampp. Tried to open from ST2 but no dice. Am i missing a step?

    # March 5, 2012 at 10:23 am

    Also getting this error message when opening http://localhost/lesson-25/in my browser:

    Fatal error: Uncaught exception ‘PDOException’ with message ‘SQLSTATE[28000] [1045] Access denied for user ‘root’@’localhost’ (using password: YES)’ in C:xampphtdocslesson-25functions.php:5 Stack trace: #0 C:xampphtdocslesson-25functions.php(5): PDO->__construct(‘mysql:host=loca…’, ‘root’, ‘root’) #1 C:xampphtdocslesson-25index.php(4): connect() #2 {main} thrown in C:xampphtdocslesson-25functions.php on line 5

    # March 5, 2012 at 3:09 pm

    Just for anyone who may experience the same problem, the issue for me was that I failed to set a password in the code (below) from the functions.php file that corresponds to the database that I set up in xampp:


    function connect() {
    global $pdo;
    $pdo = new PDO("mysql:host=localhost;dbname=sakila", "root", "root");

    I hate myself sometimes!

    # March 5, 2012 at 5:41 pm

    @andy_unleash There is a plugin available for Sublime Text 2 that allows you to upload (using Transmit) by simply pressing CMD+U: https://github.com/jeffturcotte/sublime_transmit_docksend

    I highly recommend it; you just set it up using Transmit’s DockSend.

    # March 5, 2012 at 5:46 pm

    Nice one Josh
    I <3 Sublime Text 2 :D

    I’ve been meaning to test this out but haven’t had the time

    https://github.com/kemayo/sublime-text-2-git

    # March 5, 2012 at 6:31 pm

    I have seen that too Karl, but I (like any typical designer) am scared of the command line, so I use the Github app for Mac.

    # March 6, 2012 at 5:39 am

    Josh – many thanks for this, I wasn’t aware of the plugin and it’s definitely going to make my life easier!

Viewing 12 posts - 1 through 12 (of 12 total)

You must be logged in to reply to this topic.

*May or may not contain any actual "CSS" or "Tricks".