Pages

Showing posts with label wordpress. Show all posts
Showing posts with label wordpress. Show all posts

[Solved] WordPress WP Super Cache + Elementor = 404 Page Not Found

I keep having this huge problem on one of my self-hosted WordPress website. I use Elementor plugin for adding dynamic content and widget. I also have the WordPress WP Super Cache plugin installed to speed up the page load time. 

However, I just can't seem to make Elementor work without deactivating WP Super Cache plugin. So there must be some conflict between the two plugins. And I compare the plugin setting on two of my sites running the same plugins, I found the problem. 

Uneven Column In Genesis Framework WordPress Theme

I've been using StudioPress's Genesis Framework on WordPress website. However, I have never seem someone give the example of using uneven columns. So here I go.

I was wondering why there are style named two-sixths. Now I see how to use it. Here is the end result of un-even column in the Genesis Framework Child theme on WordPress blog.


And here is the HTML source code.

[Solved] WordPress Shortcode Manager Plugin UTF-8 Issues

I love using ShortCode Manager in the Wordpress to handle extra content that is unique to my situation. It allows me to code PHP and dynamic content in the shotcode and use it on WordPress page or post.

However, the Chinese characters in the ShortCode just become garbage and bunch ? mark.

Stylesheet For Better Listing Using li:before And Word-Wrap

Sometimes using default list-style-type just can't make the layout looks much better. It looks like this on one of my client's WordPress website.


The second line is wrapped below the > symbol. Using the default list-style-position: outside; won't solve the problem. The only solution is to use table display style to make it looks like a table cell and row. So using the following stylesheet and display attribute will solve the problem.


Fixed: MailChimp Success Message Missing With Conflict jQuery Issue

There is a problem with Mailchimp, when you use embed HTML code to show mailchimp subscription form on your website. The error message does show, but the successful or require email confirmation (double opt-in) message is missing.

This happens due to that jQuery library is loaded more than once in the page. For example, if you are running a WordPress blog (version 3.9.1 or later), the jQuery is loaded by the theme in most cases. The jQuery library may load more than twice, if you also install third-party plugin that is using jQuery or jQuery UI.

You can see the error in the browser debugger. "$ is not a function" at following line.
function mce_success_cb(resp){
    $('#mce-success-response').hide();

It means $ isn't an object or function after the jQuery was loaded.

The easy solution is to add the following code after "function mce_success_cb(resp){"


jQuery(document).ready( function($) {

Remember to close the function call at the end of "function mce_success_cb(resp){" bracket.

});

Stop WordPress Crash From Brute Force Attack On WP-LOGIN.php

Just few days ago, my VPS at Hostgator has horrible crash. No matter how many time I restart the container, the memory usage is always reaching 101% and the server die.

After 2 hours struggling with the tech support, they finally told me that my server is under brute force attack. The hackers or bots are trying to hit on one of the WordPress website's wp-login.php file.

So WordPress was trying to do query to check the login and password. This process took over 100% CPU usage and try to hit on MySQL too many times. So the server went to cooling down mode.

There is no easy way to block those IPs. So the temporary solution is to stop the bot from hitting the wp-login.php file and summiting the login and password by password protecting the wp-loginl.php page. So it will prompt to enter extra login and password before login to WordPress.

This process add an extra file look up at Apache level.

Here is how it works.

  1. Setup a hidden .wpadmin file above your website root. It's usually under /home/[username]/
  2. Run SSH tool like putty.exe login to your web server as root.
  3. execute the commentline: htpasswd -c .wpadmin [login name]
  4. It will prompt you to enter password
  5. Once you set the file you will need to add few lines of code to .htaccess file for each one of your WordPress installation

ErrorDocument 401 "Unauthorized Access"
ErrorDocument 403 "Forbidden"
<FilesMatch "wp-login.php">
AuthName "Authorized Only"
AuthType Basic
AuthUserFile /home/[username]/.wpadmin
require valid-user
</FilesMatch>

Stop Remote Comment Spam Bot on WordPress Blog

SPAM!
Image Source: SPAM Courtesy Of: MasterMan

If you are running WordPress blog, you may already suffer the lost of your valuable time on fighting for the remote comments submitted by the Remote Comment Spam Bot. It's a known issues with WordPress and there is a work around solutions.

Block WordPress Remote Comment Spam Bot


Your can Read Terence Chang's Living The Dream Lifestyle blog and find out the solution he improved that has stop the spam bot.

WordPress error with capabilities.php, classes.php and the_excerpt_reloaded() fatal error

For some reasons, I just recently receive the following errors on one of my blog hosting account. Nothing has changed on the WordPress side. I was wondering what was changed on the hosting side. However, I could not get hold with the hosting company support. I finally found the resolutions.

Here is the error message suddenly appear. It seems to me something went wrong with the wordpress plugin.

Warning: Invalid argument supplied for foreach() in /home/powecha8/public_html/blogontshirt/wp-includes/capabilities.php on line 31

Warning: Invalid argument supplied for foreach() in /home/powecha8/public_html/blogontshirt/wp-includes/classes.php on line 88

I have also got the following error because I used the excerpt_reloaded plugin, which is using the above two php files.
Fatal error: Call to undefined function: the_excerpt_reloaded() in /home/powecha8/public_html/blogontshirt/wp-content/themes/silhouette-3column/home.php on line 20


Problem:
The problem is because the PHP magic_quote was on. I guess the hosting company reset the value and make it default to ON, which should be turned off.

Resolution:
Add the following line to the customized php.ini file under the root of the hosting account.

magic_quotes_runtime=off
magic_quotes_gpc=off


Or

Add the following lines in to the .htaccess file at your root of hosting account.

php_flag_magic_quotes_runtime off
php_flag_quotes_gpc off