How to Bulk Upload Media Files Using WordPress CLI

Most hosting providers set a maximum file upload in WordPress ranging from 2 to 64MB. This is a huge restriction especially when you want to upload a lot of large files. Even if you manage to increase the upload size limit, big GIF and video files often cause timeout error when uploading through WordPress media…

7 Ways to Redirect WordPress Attachment Pages

Every time you upload a media file to your website, WordPress will automatically generate a new “attachment” page for that file. In other words, there is an attachment page for each file upload that you have on your website. This page displays your embedded PDF file with a description if any on a blank page. For example, if you upload a file…

Redirect users back to protected files after WordPress login

Prevent Direct Access plugin provides an easy way to protect WordPress media files against Google and unwanted users. When users access your protected file without proper File Access Permission (FAP), they will be redirected to “No Access Page” which is 404 error page by default. In certain cases, you want to redirect your users to WordPress login…

Build Your Own REST API on WordPress in 3 Minutes

In this article, we will learn how to build a REST API on WordPress. Registration In order to build our API, we first need to register it with WordPress by using  rest_api_init hook which fires when the API request is coming. add_action( ‘rest_api_init’, ‘regsiter_api’, 10 ); Inside the register_api function, we will register the routes and implement…