I took the concrete5 content management system out for a spin today. Its very pretty and the interface is great. There were a couple things I had to tweak in order to make it run on my local development system. Its the usual suspects: permissions, virtual hosts, and permalinks. They were an easy fix (for a seasoned WordPress developer), but why not learn from my mistakes?
Setup
Official installation instructions for Apache servers can be found here. I feel like I need to post the link because the page was actually a little hard to find on the concrete5 website. Here we go!
- Download concrete5 from the download page
- Extract the files and put them in your webserver’s root directory (probably /var/www). You can name the top-level folder whatever you want. I called mine “concrete5″
- Go to your terminal and sudo yourself (you’re going to need root permissions most of this):
$ sudo su - In your terminal, navigate to your concrete5 install and run:
$ chmod 777 config/ files/ packages/(don’t worry, we’ll change this back to something more secure later) - In your browser, go to your localhost phpMyAdmin and create a new user with a new database and grant that user all privileges (Privileges > Add a new user)
Installation
- In your browser, navigate to http://localhost/concrete5. You will see a list of installation requirements under “Testing Required Items” that should be all green checkmarks. Fill in the Personal Information and the Database Information (server will be “localhost” and database name should be the same as your username)
- Click install, and you should get a message that says your installation is complete. Take down the randomly generated admin password, cause you’re gonna need it.
Permalinks
- After installation, you’ll be presented with your new website. Click on Dashboard in the top right corner
- From the Dashboard, click on Sitewide Settings in the lower left
- Under Linking, put a checkmark next to “Enable pretty URLs” and click save
- If your setup is like mine, you’ll get a little warning that says “URL rewriting enabled. Make sure you copy the lines below these URL Rewriting settings area and place them in your .htaccess or web server configuration file.”
- Find the code that was generated for your .htaccess file under Required Code. Highlight and copy that.
- Back in terminal, navigate to your concrete5 install directory and make a new file called .htaccess
- Paste the “Required Code” in that file.
- Change the line
RewriteBase /concrete5/toRewriteBase /
Virtual Hosting
- Still in terminal, navigate to
/etc/apache2/sites-availableand create a file called concrete5.dev. Fill it with something like this:<VirtualHost *:80>
ServerName concrete5.dev
ServerAlias concrete5.dev
ServerAdmin myemail@host.com
DocumentRoot /var/www/concrete5/
</VirtualHost>
- Save that file and
cdover to/etc/apache2/sites-enabled. Create a pseudo link like this:$ ln -s ../sites-available/concrete5.dev concrete5.dev - In the terminal, add line like this to the
/etc/hostsfile:127.0.0.1 concrete5.dev - Restart apache:
$ service apache2 restart
Finishing Move
- Open this file in a text editor: /var/www/concrete5/config/site.php
- site.php is generated by the installation process. Its very similar to config.php in WordPress. You need to edit it a bit to get permalinks and virtual hosts working
- Change the line
define('BASE_URL', 'http://localhost');todefine('BASE_URL', 'http://concrete5.dev'); - Change the line
define('DIR_REL', '/concrete5_v2');todefine('DIR_REL', '');
Secure your site
Edit 2/25/11: File these steps under “hella important”. In the terminal, navigate to your concrete5/ directory and enter the following lines to set more secure file permissions:
sudo chmod -R 755 config/ files/ packages/sudo chmod 644 config/site.phpsudo chmod 755 sitemap.xml
That’s it! You should be able to navigate over to http://concrete5.dev in your browser and see your new site.