WordPress is asking for FTP credentials to update plugins, FINALLY RESOLVED

I was dealing with this problem for a while and did not know how to give WordPress permission to write to his folders when updating plugins or themes.

On the other hand this was forcing me to chmod wp-content/uploads  folder with 777 permissions. I am not a heavy image uploader, so when I was in need of updating I was just chmod to 777 and then, after uploading my stuff, get back to 755.

I am not a Linux lover, geek, guru (or how they call it) so I had no clue about why this happened on my VPS or how to fix that. But as a respectable “self-directed learner” as I am, I had to dig into the situation. Continue reading “WordPress is asking for FTP credentials to update plugins, FINALLY RESOLVED”

PrettyPhoto Minimal Theme – a pure CSS prettyPhoto simple theme

I have recently used prettyPhoto for a project and I have to admit that it is a great tool to have in hand when it comes to modal pop-ups.

It has lots of types of content support and it is really simple to customize. prettyPhoto also comes with lots of features and 5 built-in themes

  • light_rounded
  • dark_rounded
  • light_square
  • dark_square
  • facebook
  • pp_default
  • minimal theme – which will add here with minimal and pure CSS

…which you can easily change via JavaScript customization. But this is not the subject of this tutorial.

I prefer a default minimal and simple theme for prettyPhoto and the ability to add stuff if I need it and not the opposite. So this is my little CSS to create a simple theme for prettyPhoto Continue reading “PrettyPhoto Minimal Theme – a pure CSS prettyPhoto simple theme”

FORBA (Finger On Respond Button Affection) – A closer look at people suffering it

I would like to dedicate this article to one of my colleagues, but I really don’t want to hurt his feelings. So I will not mention his name here.

So, I will like to tell you a little bit about the so-called finger on respond, or send button which is quite a terrible affection that it is expanding very quickly lately. You will find out how this disorder started and spread out, on an epidemic scale.

Continue reading “FORBA (Finger On Respond Button Affection) – A closer look at people suffering it”

Simple “time to stop working” jQuery counter with alert

I am sure there are tons of countdowns out there, but I think none was built for this special purpose. I was playing with the jquery counter and just came to me: I want an alert to remind me to stop working and tell me to go home when it’s time.

Yes, of course I could just use the phone alert…but this is funnier…and I can say “I made this” 😀

The good part, is that you can pin the tab in your favorite browser (I am a Chrome evangelist) and every time you start it, it also starts the timer. The counter restarts automatically every day, so you don’t have to worry about it and it shows the alert no matter what you are doing when time finishes.

I customized so it pup ups the alert every day at 5:30pm exempt on Friday when it shows me the alert al 2:30pm. Feel free to do it your way.

Continue reading “Simple “time to stop working” jQuery counter with alert”

Benchmarking on the glob() “dinosaur” and readdir() PHP functions

Well..it’s true. The PHP glob()  function is a big dinosaur, memory eater and speed blow upper (if that can be said). So let’s test the glob()  function against some other alternatives.

I have recently had to detect duplicated/missing files comparing two directories in a set of 80.000 files and I used the PHP glob() function. 80k is a reasonable number for a local machine. But later I had to deal with 800k and that is really a lot if you don’t do things the right way. So I had to try some other alternatives.

I had to do some benchmarking in the area and I used a set of 25.000 images and another folder with 10.000 random duplicates. I think this is a reasonable number to see any differences in the final result.

Continue reading “Benchmarking on the glob() “dinosaur” and readdir() PHP functions”

How to compare two directories for missing files using PHP

Detecting the missing files when comparing two directories can be a tricky job to do. So this is my scenario:

I am trying to pass some image throw a small piece of software for batch processing and I always get timeout due to the big quantity of images. There are around 80.000 images that I am trying to process and the software get stuck to (let say) 10.000 images so I have to start all over again and I have no idea which are the missing files.

So my solution is to take out the images that have been processed from the folder and feed the program with the images that have not been processed.

So to find out this I have to compare the 2 directories for duplicated files. In other words “detect the missing files”

Continue reading “How to compare two directories for missing files using PHP”

Enable/Disable WordPress Automatic Core, Plugins and Themes Updates

Back in 2013, the WordPress 3.7 introduces the automatic update feature. There are 4 types of updates and that includes, the WP core, plugins, themes and languages.

Although updates are a good thing to do, from a security point of view, there are some aspects that you will want to take into consideration when doing an update.

So you may want to choose the time of the update, you may want to choose what to update and most of all you would like to take a full backup, just in case things don’t go out well, specially when updating themes.

So if you want to have it all controlled and take decisions after you first test everything, you can completely disable all automatic updates by adding this line to your wp-config.php . Continue reading “Enable/Disable WordPress Automatic Core, Plugins and Themes Updates”

Change default 1M max upload filesize limit for WordPress Mutisite

If you are like me playing around with the WordPress Multisite feature and you’ve run into the max allowed upload filesize limit of 1M, you are in the right place to fix it.

There is a not quite intuitive (for me) option in the Super admin dashboard that allows you to change this. Please note that this does not overwrite your apache or php.ini settings if this last one is smaller. Here you can apply the rule of the most restrictive.

So here are the steps to achieve this:

Here are the steps to change the Maximum upload file size within WP admin: Continue reading “Change default 1M max upload filesize limit for WordPress Mutisite”

Case study: What 5 languages should I use to translate my website?

I have recently been asked by a client about what 5 languages should he use to go international with his website. Well, beside translating in the obvious English language, I did not know which one should he go next.

I think 10 is the magic number on this, so I will enumerate just the first 10 of them. If you are interested in more than 10 languages, then the order is not quite important Continue reading “Case study: What 5 languages should I use to translate my website?”

Migrating multisite WP, don’t forget to edit wp-config.php

I have previously write about migrating WP using the database search/replace php tool. But migrating a MultiSite intalation is a little bit different.

This is the first time I am playing with WordPress and the multisite feature, so I am learning from my mistakes. There is a small change that I missed the first time I have read the documentation in WP Codex about Moving WordPress:

If database name or user changes, edit wp-config.php to have the correct values.

Continue reading “Migrating multisite WP, don’t forget to edit wp-config.php”