- Lance Johnson 11.21.2010
Symbolic links are one of those things that you probably don’t come across unless you are trying to solve a problem that they are the solution to. We like to use symbolic links to keep a handle of a number of things in a local development environment - mainly, addons.
So I guess let’s learn about symbolic links and how they can be utilized for maximum maximumication*.
We don’t really need to get too technical, but basically symbolic linking is a way to put a file or folder in multiple places. What makes symbolic links awesome is the fact that the folder or file link will act just like it is the real thing.
For instance, here is a path to an actual file inside an actual folder:
/computer/system/folder/file.php Now let’s say we have a symbolic link of folder, and we put that into /computer/another_system/. And then our PHP code uses this file path:
/computer/another_system/folder/file.php Bazam! That will work. So will any other files within folder. The computer thinks they are there, but they are really someone else. Magic.
Note: Symbolic links are not the same thing as file aliases. They share some features but will not work for this application.
If you are on OS X, I recommend a handy little symbolic link maker tool called Symbolic Linker which gives you a contextual menu option to make a symbolic link. You can also use the terminal, but I find this way much easier.
Note: Lance would use the terminal because he likes it. He also drives a stick shift in San Francisco.
To create a link, simply open the contextual menu, and find “Make Symbolic Link”.
You’ll get a folder called the original name of the folder plus “symlink”. You can rename this file to whatever you’d like.
That’s it! You now have a symbolic link.
We all have our addons that we use over and over again, and when beginning a new ExpressionEngine site, time is wasted installing new addons as you need them.
What we like to use is a master addon folder separated out into the addon themes and the actual addon files.
For every new local ExpressionEngine install, instead of copy/pasting all of the addons we use over and over, we simply make a symbolic link to those folders and put them in the correct places in the system.
When we open up ExpressionEngine for the first time for a project, we simply go in and active the addons we need to start with, and then the ones we require as we go on. The addon installation is recorded in that ExpressionEngine install’s database, as well as any addon data. The files just do their thing.
When a new version of an update comes out, just replace it in your master addon folders, and it will update for all of your local installs. When you want to deploy, just grab the addon folder your need and upload ‘em.
Everyone’s setup is different, so your use of symbolic links will differ depending on your workflow. However, there is no denying that they are an awesome little tool for certain situations.
Just try to deny it. You can’t.
Point - made.
*Not a word.
Plagued by Fatal error: Class 'EllisLab \ ExpressionEngine \ Service \ Database \ Database' not found? I was too. And it was my own fault.
ExpressionEngine is a well known content management system (CMS). Many large organizations around the world use this system to run their websites. The reason is simple- ExpressionEngine is highly customizable and stable which is why it is preferred by so many web developers. One of the greatest benefits of using ExpressionEngine to manage content on your website is that it is easy to use. You don't have to know PHP (the programming language it is written in) to use ExpressionEngine. The makers have kept the user interface user friendly and simple without sacrificing the system's utility.
ExpressionEngine is one of the advanced web design and development tools that you can use today. With ExpressionEngine, creating highly sophisticated websites with intricate details is possible. So now you have a highly complex yet user-friendly ExpressionEngine e-commerce site for your business. But how safe is it for monetary transactions? Will your customers' financial information and demographic information be safe on your site? Security is one of the most important things you should consider when designing an ExpressionEngine e-commerce site for a business. In this article, we will focus on what you should do to secure your ExpressionEngine website. The idea is to make sure that your website is secure and also efficient.