Samuel Elh Blog

WordPress, PHP, Python and JavaScript tutorials and snippets

Page 2 of 7

Bulk Download Wistia Account Videos

In this quick tip, we’ll learn about downloading your Wistia account videos in batch, and saving to your local or preferred drive. We’ll be using Python for this as it is easy and quick to implement, but you can also use the scripting language of your choice. As there is no official feature from Wistia […]

Continue Reading →

Get Alexa Site Rank: Python, PHP and JavaScript

In this quick tutorial we’ll learn about how to use Alexa‘s public API to retrieve the global rank for a given website. Alexa provides a public API with an XML response containing the queried domain rank data, here’s the API endpoint URI: Get Alexa Site Rank with Python: Python is the best for this, running […]

Continue Reading →

PHP API Rate Limiting with Redis

Rate Limiting (wiki) is a very useful technique to keep your server resources on a good use, and avoid using your full bandwidth when you are providing free or paid API services that users can be granted access to it. Rate limiting is often used to prevent robots from exhausting your API endpoints, and also […]

Continue Reading →

How to fix 400 Bad Request – request header or cookie too large

Recently while developing a site for a client that uses cookies, I run into an issue where I had large cookies stored in the browser and sent on every request, while it exceeded the size limit, Apache started throwing 400 (Bad Request) errors on screen. It is not quite advised that your website stores huge […]

Continue Reading →

Find broken links in a project files with Python

In this quick tip, we will learn about scanning a project directory HTML files for quickly fetching links and scan for broken links that we have. Broken links are usually a bad practice and something that one worried about their SEO score should detect and remove or update, as they affect your ranking in a […]

Continue Reading →

Integrate credit card payments with Stripe

In this quick tip tutorial we will learn about using Stripe API to receive payments from credit cards and charging users and verifying the payments. Getting Started We’ll create a folder for our project and use it. For the sake of this tutorial, I’m naming it to┬ástripe-payments. Right after that, we’ll need to require some […]

Continue Reading →

Create MySQL database and user without PHPMyAdmin

In this quick tip tutorial, we’ll learn about the following: How to create a MySQL database How to create a user that connects to this database How to do all of the above from the terminal without PHPMyAdmin Now if you were installing WordPress or a PHP application whatsoever for your site, you’ll normally be […]

Continue Reading →

Add WordPress network settings page for your plugin

In this tutorial, we will learn how to add a network settings page for your WordPress theme or plugin, add settings fields to this page, and update these fields. Add network settings page – register menu If you haven’t already added settings page for your WordPress theme or plugin in a regular non-multisite install, there […]

Continue Reading →

Gist: List active plugins in WordPress (including multisite)

This gist is intended to help you list all of the active plugins in your WordPress installation, involving network active plugins when in a multisite. The Gist: Usage: Check if a plugin is active: Print the plugins list:

Continue Reading →
« Older posts Newer posts »

© 2017 Samuel Elh - Powered by WordPress, DigitalOcean & NameCheap

Theme by Anders NorenUp ↑

Subscribe to our mailing list

Sign up to receive updates about WordPress, free and premium plugins and themes in general and tips and tricks

* indicates required