Posts Tagged ‘wordpress’

xmlrpc.php

Recently in the server logs I saw lots of attempts to /xmlrpc.php

/xmlrpc.php is the file used for Pingbacks, so if someone links to my blog , they can add my blog article and WordPress will check in then create a link to the users site. This actually opens up wordpress sites to be used for DOS’ people

https://www.trustwave.com/en-us/resources/blogs/spiderlabs-blog/wordpress-xml-rpc-pingback-vulnerability-analysis/

 

You can disable access to this file via updating .htaccess

# Block WordPress xmlrpc.php requests
<Files xmlrpc.php>
order deny,allow
deny from all
</Files>

VN:F [1.9.22_1171]
Rating: 0.0/10 (0 votes cast)
VN:F [1.9.22_1171]
Rating: 0 (from 0 votes)

Recently installing the Jetpack Plugin on a website for its many benefits, and trying to enable any of the site fucntions brought up an error

Error updating settings. Api404Error

This plugin actually relies on WordPress JSON Query which can be found in the ‘dir’ /wp-json/ e.g. http://www.pariswells.com/blog/wp-json/

For the effected website this was not found ( 404) , this website was actually copied from another site so the .htaccess was mis copied.

Recreatiing the Permalinks for the site found under Settings ( Just set to something else and save , then change it back recreates this )

This resolved the issue

VN:F [1.9.22_1171]
Rating: 10.0/10 (1 vote cast)
VN:F [1.9.22_1171]
Rating: +1 (from 1 vote)

The Fucntion for this is :  http://codex.wordpress.org/Function_Reference/comment_reply_link

Howvever you can disable discussions in Comments via :

Enable nested comments in Admin > Settings > Discussion:

Enable threaded (nested) comments levels deep

 

Can also be personalised via 

Personalizing the WordPress Comment Reply Link

VN:F [1.9.22_1171]
Rating: 0.0/10 (0 votes cast)
VN:F [1.9.22_1171]
Rating: 0 (from 0 votes)

Debian

sudo rm -f /etc/ssh/sshd_not_to_be_run
sudo systemctl enable ssh
sudo systemctl start ssh

Ubuntu

sudo mv /etc/init/ssh.conf.back /etc/init/ssh.conf
sudo start ssh

Setting the IP

sudo ifconfig eth0 192.168.1.234 netmask 255.255.255.0 up 
 

 

VN:F [1.9.22_1171]
Rating: 0.0/10 (0 votes cast)
VN:F [1.9.22_1171]
Rating: 0 (from 0 votes)

Add the Following Code to your Functions.php theme file ( under Appearance ) 

/*
 * Split Description\TagLine
 */
    function get_split_description() {
        $title = get_bloginfo( 'description', 'display' );;
        $lines = explode(' &#8211; ', $title);
        $output = false;
        $count = 0;
 
        foreach( $lines as $line ) {
            $count++;
            $output .= '<span class="line-'.$count.'">'.$line.'</span><br> ';
        }
 
        return $output;
    }

 

 

Change in your header.php file to use the following :

<p class="site-description"><?php echo get_split_description(); ?></p>
					<?php endif; ?

 

 

Then change your Tagline to line 1 – line 2 ( with a slash and space in between ) 

VN:F [1.9.22_1171]
Rating: 10.0/10 (1 vote cast)
VN:F [1.9.22_1171]
Rating: 0 (from 0 votes)

Recently upgrading a customer wordpress plugins I got greated with a

Call to undefined function doing_action()

When trying to login to the admin section , this was on Line 616 in file /google-analytics-for-wordpress/admin/class-admin.php

Comment this line out ( change to

//return doing_action( 'yst_ga_aggregate_data' ) && defined( 'DOING_CRON' ) && DOING_CRON;

Which will let you login to wordpress , update the wordpress version , and re-uncomment the line and save

return doing_action( 'yst_ga_aggregate_data' ) && defined( 'DOING_CRON' ) && DOING_CRON;
VN:F [1.9.22_1171]
Rating: 0.0/10 (0 votes cast)
VN:F [1.9.22_1171]
Rating: 0 (from 0 votes)