• Debug WordPress Like a PRO

    If you build or maintain WordPress websites, sooner or later you will run into issues. There are many ways to go about debugging in WordPress, but there it is how the professionals do it. Activate debug log Turning on debug mode and displaying the errors on frontend is one ugly business. It’s neither easy to…

  • Check If Post Slug Exists

    In the rare cases when you need to check if a post exists by slug, here goes a function to handle that. Note that the slug in WordPress is internally referred as post_name. Include the function below in your WordPress project. You can add it to your functions.php file in your theme or any file…

  • Find Posts with the Most Number of Revisions

    I was working on a content-heavy website that have a very big wp_posts table. This obviously caused by a revisions. To confirm this I needed to find out which where the posts with the most number of revisions. As I had guessed, I found out revisions where killing the wp_posts table. Quite a few posts…

  • Assign Authors or Co-authors to a WordPress Posts Programmatically

    There are occasions when you need to do something programmatically, i.e., through a little function, rather then by clicking on a button in WordPress. Such was the case when I needed to re-assign an author to massive amount of posts. There were just too many posts to do it manually from the backend of WordPress,…

  • Overwrite Default Post Permalinks

    Every WordPress post has a permalink by default. The permalink is displayed, as expected, by the the_permalink() function. In some cases, we might need to enforce another URL to a post as its permalink, be it another link within the site or an external URL. We can provide the custom URL through a custom field…

  • A Guide to Actions and Filters in WordPress

    WordPress comes with this built-in API that allows us to hook custom functionality into the rest of WordPress. We can provide that extra functionality through plugins or themes. These are called hooks and they are either actions or filters.  Actions allow us to run custom functions at a certain points of a request, while filters…

  • How to Get Post Slug in WordPress

    The post slug is the part of the URL of a post or page at the last section. E.g.: Page: https://wplancer.com/about/Post: https://wplancer.com/2015/09/post-slug-here/ There are two ways to get the slug in WordPress inside the loop. The first way is to access the $post object that is available inside the loop. The second way is to…

  • PHPloy – Deploy Git Repos Easily through FTP/sFTP

    Let me ask you a question: How mad do you get when you have to remember which files you edited and select them on FileZilla to upload to the server? That’s right – very mad. And sometimes you just upload the whole project because you don’t remember what you edited. I have four words for…

  • Introduction to Subversion

    On my previous post I wrote about installing and configuring Git because I’m really a Git guy, but I have this client now that prefers SVN, short of Subversion version control system, so I had to learn it too. In this post I’m going to introduce you to SVN and how to get it to…

  • How to Install and Configure Git on Ubuntu

    If you develop websites, like me, or write software of any kind, you should be using a version control system, and Git seems to lead the herd and I personally use it and I recommend it to anybody. This little tutorial is going to teach you how to set up Git on a computer running…