Drupal

I've had hard times setting up a LAMP Vagrant box. There are tons of "tutorials", but none gave me the right direction to have a fully functional LAMP stack running as localhost.

So, hey, since I'm a nice guy, I'll spare you some headaches and tell you how you can do it easily.

We'll use this box : https://github.com/TomJaeger/vagrant-puppet-lamp, which has Apache, PHP and MySQL.

  1. Obviously, you'll need Vagrant and VirtualBox. Go get them, and install both.
  2. Clone the repo : git clone https://github.com/TomJaeger/vagrant-puppet-lamp.git
  3. Go to the box folder : cd vagrant-puppet-lamp
  4. Run the VM: vagrant up
  5. Connect to the VM via SSH: vagrant ssh
  6. The tricky part: Run postinstall.sh as a sudoer: sudo ./postinstall.sh
  7. It works ! Visit http://localhost:8080. You can access MySQL at localhost:8889 with user "root" and password "root".

I see that everytime, mostly in Wordpress / Drupal / Whatever templates :

<ol class="commentlist">
...
</ol><!-- .commentlist -->

Don't ! here is why :

  • No one but an hypothetic future developer will ever need this. But you serve it to the entire world.
  • It makes HTML file heavier, since the browser will download these comments. At least use PHP comments.
  • With correct indentation, this is most of the times useless. Code is readable enough if correctly indented. It is actually less readable and adds noise.
Syndicate content