Difference between revisions of "Customize"

From wiki.linuxonlinehelp.eu
Jump to navigation Jump to search
 
 
(7 intermediate revisions by the same user not shown)
Line 1: Line 1:
==Wordpress Customize==
+
===Wordpress Customize===
 
+
==Security Info==
Security Tip: Reduce the count of Wordpress Plugins, do never use PHP Upload Plugins like "Gallery" cause most of them are scanned by hackers to access the file systems of the Webserver !!!
+
* Reduce the Count of installed and used Wordpress Plugins, LESS is MORE!
 +
* Do never use PHP Upload Plugins like "Gallery" cause most of them are scanned by Hackers to Access the File Systems of the Webserver !!!
 +
* Check Folder Rights like Images where Uploads are stored!
 +
* Use a minimum of Plugins to redesign and relocate internal Links! Cause Search Bots don't know how to read!
 +
* A Basic Setup is FAST and CLEAN READABLE by Bots Scripts and ranked up by Speed (I/O)!
  
 +
==Date Remove on Posts==
 
to remove date of posts edit functions.php
 
to remove date of posts edit functions.php
 
<pre>
 
<pre>
Line 12: Line 17:
 
</pre>
 
</pre>
  
force ssl login to wp-admin.php add to wp-config.php and block port 443 to public access (iptables firewall)
+
==Hardening Wordpress==
 +
Force SSL Logins to Login Pages
 +
add to wp-config.php  
 
<pre>
 
<pre>
 
define('FORCE_SSL_ADMIN', true);
 
define('FORCE_SSL_ADMIN', true);
 
</pre>
 
</pre>
delete trash add to wp-config.php
+
 
 +
==Delete trash after 30 days==
 +
Add to wp-config.php
 +
<pre>
 +
define('EMPTY_TRASH_DAYS', 30);
 +
</pre>
 +
 
 +
==Disable Wordpress Cron==
 +
Add to wp-config.php
 +
<pre>
 +
define('DISABLE_WP_CRON', true);
 +
</pre>
 +
 
 +
==Reduce Revsions History==
 +
Add to wp-config.php
 +
<pre>
 +
define('WP_POST_REVISIONS', 3);
 +
</pre>
 +
 
 +
==Auto Save Intervall on Edit==
 +
Auto Save every 2 Minutes
 +
<pre>
 +
define('AUTOSAVE_INTERVAL', 120);
 +
</pre>
 +
 
 +
==Disable Auto Wordpress Updates==
 +
Must be done cause it can destroy your Blog!
 +
<pre>
 +
define( 'WP_AUTO_UPDATE_CORE', false );
 +
</pre>
 +
 
 +
== Wordpress MySQL Database User Privileges ==
 +
enter on MySQL Console as DB-Admin!
 +
<pre>
 +
GRANT SELECT , INSERT , UPDATE , DELETE ON  wordpress.* TO 'user'@'localhost';
 +
</pre>
 +
 
 +
== Customized Search Form ==
 +
create a file called searchform.php at your theme folder and enter:
 +
<pre>
 +
<form role="search" method="get" id="searchform" action="<?php echo home_url( '/' ); ?>">
 +
<div><label class="screen-reader-text" for="s">Search for:</label>
 +
<input type="text" value="search = HOWTO" name="s" id="s" onfocus="if (this.value == 'Search & Hit Enter') {this.value = '';}" onblur="if (this.value == '') {this.value = 'Search & H$ </div></form>
 +
</pre>
 +
The Placeholder Message Text can be set at area "search = Howto"
 +
 
 +
== Customize Wordpress Tag Cloud Widget ==
 +
edit functions.php at yor Theme Path and insert at the end:
 
<pre>
 
<pre>
define('EMPTY_TRASH_DAYS', 0);
+
function custom_tag_cloud_widget($args) {
 +
$args['number'] = 0; //adding a 0 will display all tags
 +
$args['largest'] = 18; //largest tag
 +
$args['smallest'] = 10; //smallest tag
 +
$args['unit'] = 'px'; //tag font unit
 +
return $args;
 +
}
 +
add_filter( 'widget_tag_cloud_args', 'custom_tag_cloud_widget' );
 
</pre>
 
</pre>

Latest revision as of 01:14, 30 June 2017

Wordpress Customize

Security Info

  • Reduce the Count of installed and used Wordpress Plugins, LESS is MORE!
  • Do never use PHP Upload Plugins like "Gallery" cause most of them are scanned by Hackers to Access the File Systems of the Webserver !!!
  • Check Folder Rights like Images where Uploads are stored!
  • Use a minimum of Plugins to redesign and relocate internal Links! Cause Search Bots don't know how to read!
  • A Basic Setup is FAST and CLEAN READABLE by Bots Scripts and ranked up by Speed (I/O)!

Date Remove on Posts

to remove date of posts edit functions.php

function theme_remove_post_dates() {
    add_filter('the_date', '__return_false');
    add_filter('the_time', '__return_false');
    add_filter('the_modified_date', '__return_false');
} add_action('loop_start', 'theme_remove_post_dates');

Hardening Wordpress

Force SSL Logins to Login Pages add to wp-config.php

define('FORCE_SSL_ADMIN', true);

Delete trash after 30 days

Add to wp-config.php

define('EMPTY_TRASH_DAYS', 30);

Disable Wordpress Cron

Add to wp-config.php

define('DISABLE_WP_CRON', true);

Reduce Revsions History

Add to wp-config.php

define('WP_POST_REVISIONS', 3);

Auto Save Intervall on Edit

Auto Save every 2 Minutes

define('AUTOSAVE_INTERVAL', 120);

Disable Auto Wordpress Updates

Must be done cause it can destroy your Blog!

define( 'WP_AUTO_UPDATE_CORE', false );

Wordpress MySQL Database User Privileges

enter on MySQL Console as DB-Admin!

GRANT SELECT , INSERT , UPDATE , DELETE ON  wordpress.* TO 'user'@'localhost';

Customized Search Form

create a file called searchform.php at your theme folder and enter:

<form role="search" method="get" id="searchform" action="<?php echo home_url( '/' ); ?>">
<div><label class="screen-reader-text" for="s">Search for:</label>
<input type="text" value="search = HOWTO" name="s" id="s" onfocus="if (this.value == 'Search & Hit Enter') {this.value = '';}" onblur="if (this.value == '') {this.value = 'Search & H$ </div></form>

The Placeholder Message Text can be set at area "search = Howto"

Customize Wordpress Tag Cloud Widget

edit functions.php at yor Theme Path and insert at the end:

function custom_tag_cloud_widget($args) {
	$args['number'] = 0; //adding a 0 will display all tags
	$args['largest'] = 18; //largest tag
	$args['smallest'] = 10; //smallest tag
	$args['unit'] = 'px'; //tag font unit
	return $args;
}
add_filter( 'widget_tag_cloud_args', 'custom_tag_cloud_widget' );