How to develop your own WordPress CRON job properly and ensure it actually runs

Hello! In this post we will be walking through how to interact with the WordPress Cron system. We will delve into how to establish your scheduled jobs properly using the built-in WordPress cron system, with no other external interactions such as the OS cronjob system. This will be useful for WordPress plugin developers as in order to develop a plugin that utilizes reliable scheduled tasks, you need to accommodate many different types of web hosting environments. What is CRON? In linux, this would be a command line utility that allows the end user to schedule jobs to run at specific days and times on a repeating basis. You can write your own script and have the operating system run it on a nightly basis. Systems Administrators use this often for things like backups, integrity checks and a wide array of use cases. What is WordPress CRON? Taking the same concept […]

How to make Woocommerce more enterprise friendly

Hello! After Working with WordPress and Woocommerce for a while, watching it grow and evolve over time, there are some constraints that we have been encountered over the years in particular with larger enterprise projects. WordPress appeals to a massive audience (43% market share to be exact). In this massive appeal, the WordPress development community has to make careful decisions in order to balance the needs of the majority of users with the unique demands that enterprise implementations may have. The most common requirements for enterprise WordPress sites would be : Redundancy, Deployment, Testing/QA and Security. All of these requirements are closely tied together in one way or another but they are all limited or hindered by the way WordPress is fundamentally designed. This can usually be accommodated with standard static WordPress sites. The moment you delve into the e-commerce world with Automattic’s Woocommerce, you run into problems. Why Woocommerce […]

How to import your Zoom Webinars into WordPress as custom content

Hello! Now, more than ever, companies businesses and individuals are leveraging web based collaborative tools like Zoom. Whether it be for company meetings, training sessions or sales seminars, the idea is to use video conferencing technology to replace in-person interactions. Zoom has emerged as a leading player, being positioned favourably at the right point in time to offer reliable video conferencing services for a variety of uses. One of the more common requests as web development agency, is to integrate the ability to “import” Zoom webinars for a business into their website. What once may have been an Eventbrite integration has now transitioned to a remote model of interaction. At Shift8, we have created a WordPress plugin to pull Zoom webinar events into WordPress as custom content. This can then be manipulated by your theme or a custom post grid perhaps. Why would you want to import Zoom Webinar’s into […]

How to scale your WordPress site for enterprise level redundancy

Hello! It often becomes a requirement for certain levels of clients to ensure service level agreements for uptime and redundancy are kept. What does this mean? Well we want to ensure that a particular site can withstand a single point of failure, which usually means we would need to expand the services across multiple endpoints. This is not a new requirement and usually is not something one would consider for small or even medium sized businesses because the costs essentially skyrocket because at this level of redundancy you need someone to design the infrastructure, roll it out, manage it, monitor it and then you need infrastructure resources such as multiple servers , load balancers and similar services to ensure this type of redundancy is kept. The purpose of this post is to walk you through, in technical terms, how to roll out a WordPress site using industry standard best practices, […]

How to bulk update all WordPress pages or posts

Hello! Sometimes its necessary to perform mass or automated actions against your WordPress content. Reasons for this can vary, but in our scenario there was a bug in a plugin relating to translated content via WPML where afte a fix / plugin update was applied, resolving the content errors was as simple as re-saving an existing post (with no changes). Normally this wouldn’t be a problem but what if your site has over 1,000 pages or posts? Doing those one at a time , or even via the “Quick edit” method can be tedious and resource-taxing (both in-person and server resources!). Alternatively, what if you needed to update a byline in the post content, or standardize a title format for your posts? The reasons can vary again ,but I thought it might be helpful to include an automated process using a method called “bootstrapping” WordPress. What this really means is […]

How to sanitize and reset all WordPress user accounts with linux shell scripting and wp-cli

Hello! There are several key best practices insofar as how to deal with security intrusions, including but not limited to restoring from backups on a clean server. In this article, I will be going over how to create an automated shell script that completes the following actions across multiple WordPress sites on your linux server : 1. Sanitize user and group permissions 2. Sanitize WordPress core admin and include files 3. Update WordPress Core 4. Update All installed plugins 5. Iterate through all WordPress user accounts and reset the passwords The above actions can be implemented as part of a broader security policy when dealing with shared hosting environments where you are hosting multiple WordPress sites. I will touch on each of the above items including the shell script snippets that are required to implement each. At the bottom of this article I will share the entirety of the shell […]

How we created our own free content delivery network for WordPress users

Try out our Free CDN service by installing the Shift8 CDN WordPress pluginHello! We thought it would be an interesting challenge both from a DevOPS perspective as well as a web development and integration perspective to create our own fully managed content delivery network. Utilization of the network is geared specifically for WordPress users. The idea being to give users a dead simple way to leverage geographic CDN endpoints across the globe by simply installing a WordPress plugin and activating with the click of a button. You never have to leave your site to register on a 3rd party website, you never have to set up API keys by hand or troubleshoot problems. We wanted it to be simple. And to work! There are many components that need to be integrated and ultimately tied together in order for a system of this magnitude to work. I’ll try to break it […]

How to protect WordPress media files and only allow the users who uploaded them to view

Hello! In the past we have written about how to protect your WordPress media files. In the past exercises we utilized a strategy to set a session cookie with encrypted details that can be read and validated at the http service (i.e. nginx) as well as application (php/wordpress) level. Since then we have refined this process to be much more secure, flexible and efficient. We have abandoned the cookie validation process for verifying the request before serving it and replaced it with a slightly more complicated but much more secure method. First before getting into the details, why would we want to protect WordPress media files? Well the answer depends on what sort of site you have and what you are trying to do, obviously. In our scenario, which isn’t necessarily unique, we have end-users that register for an account in order to check out of a Woocommerce store. We […]

How to implement a government ID verification system with Woocommerce and WordPress

  Need this implemented on your site? Click here and fill out our quote form!   Hello! There are many reasons why your Woocommerce store may need a system to accommodate verifying the identity of your customers. Depending on what your selling and the local or federal laws that are in place, having the identity of your consumer verified may be needed for liability or compliance reasons. Additionally under certain conditions within your Woocommerce store (such as orders over a certain amount of money), validating the identity can dramatically reduce the risk of fraud and fraudulent transactions on your site. I’m going to go into details with how to implement a system into your Woocommerce store that will accommodate the following : Provide a section within the Woocommerce “my account” area for end-users to upload a digital image of their ID Add a new field for the user details to […]

How to make bulk changes to WordPress Woocommerce product attributes with PHP

Hello! Sometimes its necessary to make site-wide changes to WordPress posts in order to save time and programmatically propagate changes without having to edit each post one at a time. For bulk manipulation of WordPress data, it is sometimes effective to write a command line PHP script to hook into your WordPress environment and execute changes. One of the main advantages with executing these types of functions on the command line as opposed to a web based interaction is you are not subject to the same execution and other timeout restrictions for web based requests. This means that a command line PHP solution can run longer, which is sometimes needed for complicated efforts. In our example, we will break down the PHP Command line script, how to safely and securely hook into WordPress to take advantage of all the built in functions, and update all the products in our WordPress […]