Migrating WordPress to HTTPS / SSL the Easy Way

Migrating WordPress to HTTPS / SSL the Easy Way

I recently migrated or moved this blog to HTTPS/SSL in light of Google announcement of using https as a ranking signal.

Chrome (the most popular web browser) currently indicates HTTP connections with a neutral indicator. This doesn’t reflect the true lack of security for HTTP connections.…

How to Setup PHPunit Code Coverage in GitLab

Code coverage on Gitlab

In a previous post, i showed us how to set up automated testing for your PHP application. If you are using the .gitlab-ci.yml configuration i posted, chances are you will get the below notice in your build log.

No code coverage driver is available

The notice is as a result of missing Xdebug PHP extension.

To install and enable Xdebug, add the commands below to the before_script: section of your project .gitlab-ci.yml

Having done the above, go to your project settings and open the CI/CD pipelines screen.…

Setting up Automated PHP Testing on GitLab CI

GitLab CI builds

I recently moved to GitLab from GitHub for private project hosting to save money. Another major deciding factor was GitLab CI, a free hosted continuous integration server which further save me more money which otherwise would have be spent on a Travis CI subscription.

In this tutorial, i will quickly go over the steps in setting up automated unit/integration testing with PHPUnit on GitLab CI.…

How to Get Users Email Address via Twitter REST API

Twitter application's permission settings

Twitter REST API hitherto did not include users email address by default when the /verify_credentials endpoint is requested, unless your application had been explicitly whitelisted after filling the special permissions part of this form.

Now you can get user’s email addresses included in the API response by ensuring you have links to your privacy policy and terms of service saved in your application settings.…

Getting Good with Git & GitHub

Git

I was recently involved in building an email marketing service (think MailChimp) where we needed to automatically send alongside HTML campaigns, their plain text version.

I was assigned to get this feature built out. To accomplish this, I tested a lot of HTML to text libraries and finally, settled for this by Jevon Wright.

Using soundasleep/html2text repository, we will be learning how to fork a Git repository on GitHub, make improvement on a fork, submit pull request, fetching, pulling and merging in changes from remote.…

Solution to “Font from origin ‘http://cdn.domain.com’ has been blocked from loading by Cross-Origin Resource Sharing policy”

Solution to "Font from origin 'http://cdn.domain.com' has been blocked from loading by Cross-Origin Resource Sharing policy"

I recently discovered icon fonts on the website of my ProfilePress WordPress plugin weren’t displaying. On viewing my browser console, i saw the following error notice logged.

Font from origin ‘http://d2hkd6cwxvu8h1.cloudfront.net’ has been blocked from loading by Cross-Origin Resource Sharing policy: No ‘Access-Control-Allow-Origin’ header is present on the requested resource. Origin ‘http://profilepress.net’ is therefore not allowed access.

Apparently, the browser was blocking connection from profilepress.net to its cloudfront CDN because of the restriction of browser’s same origin policy whereby siteA cannot fetch content from siteB unless via Cross-Origin Resource Sharing (CORS) in which response from siteB include a Access-Control-Allow-Origin header granting permission to siteA.…