To force HTTPS connection on the wp-admin directory, edit your wp-config.php file and add This will ensure the admin area is always loaded with SSL, ultimately resulting in a safer WordPress installation. Force HTTPS on the WordPress login page was last modified: April 12th, 2015 by Thomas
Wordpress
Wordpress is a content management system (CMS) that is very popular for personal blogs and news sites all over the world. Posts that include the Wordpress tag are often contain code snippets to improve the Wordpress experience or tweak the core system of Wordpress.
Add a canonical tag to WordPress header.php
Adding the canonical tag to your WordPress blog might be essential if you do not want search engines to see your content twice (= duplicate content) and thus giving you a penalty as such. To add this tag, simply go to your theme’s folder and find header.php. Now, add the following somewhere after <head> but Continue reading →
WordPress: Only show something on non-homepage
This piece of code can be used in your WordPress templates in order to show a piece of text or code on all pages expect for the homepage. If you want to make a button that points back to the homepage, for example, than you can use this code as it makes no sense to Continue reading →
Search for text in a file within a specific directory in Linux
Sometimes, you need to find something quickly and don’t want to open tens or hundreds of file to find it. Luckily, Linux is a powerful operating system and can assist you in finding what you need. If you need to find something, let’s say you are looking for a specific piece of text within a Continue reading →
Change default uploads folder in WordPress
To change the default folder where uploads are stored on your webserver when using WordPress as your CMS, open wp-config.php and add the following line of code: In this case, the folder where uploads are stored is called ‘uploads’ and can be found at example.org/uploads/ and are then, based on your settings, saved in a Continue reading →
Repair a broken WordPress database
If you WordPress blog MySQL database is broken, maybe as a result of manual tweaking, and you get errors, you can let WordPress fix your broken database all by itself. To do so, open wp-config.php and add the following line at the end of that file: This will ‘allow’ your WordPress installation to perform a Continue reading →
WordPress text widget missing after site move
I moved a WordPress database over to a new home and apparently, all of my text widgets where missing. This might also happen when you try to edit your WordPress database in PHPMyAdmin (for example, you tried to manually edit a text widget in your database instead of the UI). To fix this, go to Continue reading →
Add a custom logo to WordPress’ wp-admin login page
The default image you find when you go to example.org/wp-admin is the WordPress logo. To change this is an image of your choice, let’s say the logo of your company, simply add the following code to your functions.php file which can be found in the wp-content/themes/your-theme directory. Of course, make sure that the /wp-admin/images/wordpress-logo.png file Continue reading →
Dynamic HTML5 meta tags for WordPress header.php file
WordPress dynamically generates the title of your pages, as well as other meta tags which are then displayed to your users as well as search engines. The number of meta tags is, however, limited. To add additional social meta tags to the default HTML5 page, such as Facebook’s Open Graph so search engines can better understand Continue reading →