Lightweight WordPress setup

WordPress is the most popular CMS used by a large number of websites, It is written in PHP which makes it an ideal choice for most people. It offers a lot of features and a really easy to use backend.

But, it performs well until the MySQL database is small and your WordPress setup does not live on to many plugins and has permalinks set correctly.

WordPress on a small Web Server cannot handle many visitors and might fail due to MySQL database crashing which at time can be a big problem,it can occur due to lack of free memory, if there are other things that use the MySQL database it will make WordPress slow if the website get a lot of traffic.

So, I decided to write a simple post, that will let you run WordPress on a small Web Server with optimum performance.

It is recommended that you do this in a clean WordPress setup and then migrate content to the newer install rather than tweaking the current WordPress install that is running in production, It is also better to test the environment before switching it to production, because there are many factors that can make a positive or negative performance difference.

Lets do it!

We will use SQLite instead of MySQL, this is recommended if the website is just a blog or does not serve or receive thousands of requests at a time, I have not tested this in high traffic, but has been rock solid stable on the amount of views I get for my website.

You can follow this guide to install and setup WordPress with Sqlite.

You can use WP Super Cache plugin and cache WordPress, so it does not have to query the database on every request, it is recommended that you set WP Super Cache only to update when a new comment is made or when new post or page is updated.

If you are running NGINX instead of using WP Super Cache you can use the build in micro-caching of NGINX also known as FastCGI cache which will cache WordPress for a fixed amount of time, this will cache the page on the first page request and will display stale content until timeout, this can do a big performance difference and can save you a great amount of system resource because it does not query the database on every request

I have written a NGINX config that can be used as an example while configuring your WordPress with NGINX setup.

I would also recommend to keep your WordPress install as clean as possible, don’t keep plugins that you don’t require, avoid plugins that are not longer being maintained and try to use a theme or write a theme that does most of the thing with the power of PHP templating.

Thanks for reading,

Have a question? leave a comment below.


IO.JS on Mac

IO.JS is a folk of Node.js that uses the latest build of Google’s V8 Engine and supports ES6, In some performance benchmarks IO.JS is faster than Node.js

The performance benchmarks of IO.JS vs Node.js can be found over here.

IO.JS is recommended if you are working on a new project, if you are using a project built on Node.js, it have a few bugs or might not support IO.JS due to various reasons.

You can download IO.JS from here

Installing IO.JS is similar to any other Mac OS X application using the pkg or Homebrew the instruction for both types are provided.

Double click the pkg.

Go through the setup.

If you prefer installing IO.JS using Homebrew, you can do that by running (Homebew is required).

“`
brew install iojs

brew link iojs –force


</div>Open Terminal and check the IO.JS and NPM version.

Thank you for reading.

Share, Have a question? leave a comment below.



Emmet for Atom

Emmet is a plugin available for popular text editors that let you write HTML abbreviations without having to directly write HTML tags, instead use Emmet’s shortcuts.

It reduces the amount of HTML the user has to write and increases efficiency and saves precious time.

A simple example.

article>header  

All you have to do is hit TAB it will be parsed as.

<article>  
  <header></header>
</article>  

You can also create the default HTML5 template with:

html:5  

it will be parsed as

<html lang="en">

  <meta charset="UTF-8">
  <title>Document</title>

As you can see how much easier it is to use Emmet compared to writing HTML directly.

Emmet has officially made their plugin available for Atom editor that can be installed using APM

apm install emmet  

You can install it using the Atom plugin tab by going into the install menu and searching for emmet and installing the plugin by emmetio

Happy Coding!

You can access all the posts over Atom under atom and editor tag.

Have a question? Leave a comment below.


Take a break!

Working on a project for hours is a thing now for me, it might be a web development project, graphics designing or Animation.

I work for hours daily, spend most of the time in web development and the rest of the time in graphics designing or animating, it tends to happen that every time I write code, there is a bug, yes that nasty bug! It takes me hours to fix it, as make that moment very stressful and painful working hours working hard to fix it,

This is not a thing that happens once to me, it happens to me to often, its mainly happens to me when I work for hours and have written many lines of code, without taking a break.

I noticed that when I looked into someone else’s code, I code to spot the issue immediately, but takes hours myself trying to fix a small bug in my code, this is a big problem, when you write too many lines of code and everything is interlinked and later have to be divided into multiple files, it is no special ability to spot a fix in someone else code, it is just that you see someone else’s code with fresh eyes.

Looking with fresh eyes is a really important thing, what is it? working on something for hours can make your eyes see the same thing over and over and over again, you eyes get ignorant about detail because it hast focus on a lot of things, and has sees a huge chunk instead of small details, **how do you fix this?**Take a break, while some may disagree, it is very effective, because you eyes and brain have been taken a short rest in see the same thing over, lets them relax for a few moments, so when you look back, you eyes are not looking at the same thing again, even after looking at the same thing again, because you brain got some time to refresh, and your brain lets your eyes look at finer detail.

You might not have enough time to take a break, maybe because of the deadline you want to meet, but just looking somewhere else and not on you screen can give your eyes an instant break.

How do I implement it?

While going some graphics designing, choosing colors and trying to choose the best gets difficult over time, while working for hours, ever time I have to make an edit, I look at something that is not my screen and looks back on to the screen and instantly knows if the color is suiting the subject, i am working with.

I do the same when writing code, I take a longer break and come back to the page of code I have written, this helps me immediately fix the issue because the mind has got a mild break from seeing and processing the same thing over and over.

Your eyes is are like web browser, you need to hit F5/Refresh to update the content. This post only supports IE 9 or above.

Try this your self, leave a comment below and let me know how it this helped you.


Learning Animation

Animation is the field of artists, where a large amount of creativity and skills is everything you need to get success and one of the best way to display creativity and create amazing motion picture.

Its fun to watch Animated film, TV shows and short clip.

It is one of the best sources of entertainment and offers the largest variety of content.

The fact that there is no age limit to watch it, makes it one of the most preferred medium of expression and storytelling. According to some sources, it’s one the fastest growing industry (booming industry).

The length of an Animated movie might as long as a live action, but it takes a long time to create an Animated movie, compared to live action, because of the way everything starts from ground up.

But it’s a totally different story when it comes to learning and creating it.

It’s something I am experiencing and enjoying as I do.

I have completed my first year of my degree in Animation, enjoying every moment of it, now heading to the second year and still have the same energy and passion, but with a much more patient personality and a more effective mind in creativity, that has helped me to work better a lot better.

To some it seems, like a place with no or lesser rules, but it’s one of those fields, where if you forget the rules, you have already failed, it something I have tried and tested.

The first year was all about 2D and Classical Animation(Traditional Animation).

Classical Animation was all about, the old school way of Animating and how the master of Animation created masterpiece before the advancement of Computers, It helped me understand how important it was to learn how thing started, so it would make me a better Animator and a much confident artist, it started with the basics, the ball bounce to Pendulum animation and finally ended up with a four legged animal walk.

2D Animation was done using Flash(software), which was a great experience, it let me implement Classical Animation practices into a more efficient way, with better flexibility.

The most important thing to learn was why and how to use the 12 principles of Animation, and why there was a need for it to exist.

To answer this question I did a small experiment with one of my assignments:

I tried animating a scene without the principles of Animation(squash and stretch, timing and spacing) and seeing the result, it was not appealing to the eyes and just seems like, pictures in motion that are not expressive and looked mechanical, it’s only made sense when you are trying to animate a robot, I later re-worked over the same scene and used the right amount of in-between and keyframe and followed the principles of Animation and ended up creating the best short clip, I could ever create at that time.

After trying that, I decided to follow rules and the 12 principles of Animation, because of the way it impacts the Animation and turns it into more expressive and comfortable experience for the audience.

Here is an example of what I am trying to explain (Timing and Spacing):

The links is no longer valid, sorry about that

I had 3D Animation in the second semester, which was done using Maya(software) a really advanced 3D software, that lets you create and build 3D Animation, models and Games.

In 3D Animation we had Animation, that was done over a pre-rigged character, ball bounce, pendulum, walk and run cycle Animation, which was similar to 2D and Classical Animation, but implementing everything inside a 3D Workspace/World.

I learn a lot more than Animation, with time I learn how to manage things and how important it is to have a Roadmap for a project and how to plan, so a milestone can be achieved with better efficiency.

Animation also thought me if you are creating something, create it so that the audience will understand, because if you create something without keeping that in mind, you will end up creating something only you can understand.

I am still on my journey of learning Animation, for now, this is all I could express, for more stay tuned.

Share, if you liked the post.