How to Create WordPress Administrative Account via FTP/File Manager

Sometimes we got ourselves locked out of WordPress backend, mostly because of forgetting password. In most cases your could reset password via Email. But you might sometimes forget your email password too. Oh, No! that’s terrible.

Here I introduce a method to create a new temporary WordPress administrative account via FTP/File Manager, so you could get in, change your old account’s password, then login in with your old account, then delete the temporary account.

The code snippet used below is not my original work, I don’t remember where I got it…

Continue reading…

WordPress Troubleshooting

How to Set Default oEmbed Width and Height in WordPress

According to the codex, https://codex.wordpress.org/Function_Reference/wp_embed_defaults

The default oEmbed dimensions is:

The width defaults to the content width as specified by the theme in the $content_width global. If the theme does not specify a content width, then 500px is used.

That means the oEmbed width/height is specified in the theme, if not, will use default value: 500px width
Continue reading…

Disable Emojis in WordPress 4.2. and Above for Better Performance

WordPress 4.2. introduced emoji functionality and inserted some inline js scripts into header area of your WordPress website.

script type="text/javascript">
			window._wpemojiSettings = {"baseUrl":"https:\/\/s.w.org\/images\/core\/emoji\/72x72\/","ext":".png","source":{"concatemoji":"http:\/\/wp4toastmasters.com\/wp-includes\/js\/wp-emoji-release.min.js?ver=4.4.2"}};
			!function(a,b,c){function d(a){var c,d=b.createElement("canvas"),e=d.getContext&&d.getContext("2d"),f=String.fromCharCode;return e&&e.fillText?(e.textBaseline="top",e.font="600 32px Arial","flag"===a?(e.fillText(f(55356,56806,55356,56826),0,0),d.toDataURL().length>3e3):"diversity"===a?(e.fillText(f(55356,57221),0,0),c=e.getImageData(16,16,1,1).data.toString(),e.fillText(f(55356,57221,55356,57343),0,0),c!==e.getImageData(16,16,1,1).data.toString()):("simple"===a?e.fillText(f(55357,56835),0,0):e.fillText(f(55356,57135),0,0),0!==e.getImageData(16,16,1,1).data[0])):!1}function e(a){var c=b.createElement("script");c.src=a,c.type="text/javascript",b.getElementsByTagName("head")[0].appendChild(c)}var f,g;c.supports={simple:d("simple"),flag:d("flag"),unicode8:d("unicode8"),diversity:d("diversity")},c.DOMReady=!1,c.readyCallback=function(){c.DOMReady=!0},c.supports.simple&&c.supports.flag&&c.supports.unicode8&&c.supports.diversity||(g=function(){c.readyCallback()},b.addEventListener?(b.addEventListener("DOMContentLoaded",g,!1),a.addEventListener("load",g,!1)):(a.attachEvent("onload",g),b.attachEvent("onreadystatechange",function(){"complete"===b.readyState&&c.readyCallback()})),f=c.source||{},f.concatemoji?e(f.concatemoji):f.wpemoji&&f.twemoji&&(e(f.twemoji),e(f.wpemoji)))}(window,document,window._wpemojiSettings);

The code bloat is used to add support for emoji’s in older browswers. For those whose main traffic are from modern browsers, it’s a good idea to remove the scripts and get faster page loading.
Continue reading…

List Woocommerce Products on Sitemap Page

I have a nice sitemap page which dynamically lists all posts, all pages, and most importantly, all Woocommerce Products.

List Woocommerce Products on Sitemap Page

I once searched on the Internet on getting a list of all woocommerce products on a page but found nothing, some guys say we can use Shortcodes included with WooCommerce, but there is none that could match the goal – list all products through sitemap template file – sitemap.php or archive.php

After digging through some boring docs, I came across some code snippets that work.

Continue reading…

Windows Technical Preview

Error 0xC1900101 – 0x20005 Installing / Upgrading Windows Technical Preview

Either you are installing Windows Technical Preview or upgrading Build 9841 to Build 9860, you are very likely to encounter the error:

0xC1900101 – 0x20005


The cause of this error is that you don’t have enough free space in System Drive/ Drive C:

To solve this, simplely allocate more disk space to Drive C: –  at lease 50G free space is needed.