Forum Replies Created

Viewing 15 replies - 46 through 60 (of 65 total)
  • Mine is D:\www\saotn.org\www-secure/wp-content (on Windows Server IIS 8.5)

    I edited /includes/class-amp-post-template.php, on line 248 and changed false to true, which solves the issue. Maybe not the best method though…

    if ( 0 !== validate_file( $template ) ) {
    -	return false;
    +	return true;
    }

    I can confirm, just installed v0.3, and the error is given during WordPress Debug:

    Notice: AMP_Post_Template::verify_and_include was called incorrectly.
    Path validation for template (D:\www\example.com\www-secure\wp-content\plugins\amp/templates/single.php) failed. Path cannot traverse and must be located in WP_CONTENT_DIR. Please see Debugging in WordPress for more information. (This message was added in version 0.1.) in D:\www\example.com\www-secure\wp-includes\functions.php on line 3898

    Forum: Plugins
    In reply to: Multisite Without Multsite

    Hi OscarGuy, I don’t know a “let’s create a Multisite set-up” plugin, it’s mainly some handwork. For mapping multiple domains to one Multisite, I use the https://www.ads-software.com/plugins/wordpress-mu-domain-mapping/ plugin.

    PS, please don’t bump your posts.

    Forum: Fixing WordPress
    In reply to: removing http:

    Hi Chrislancs,
    What the remove-protocol plugin does, is removing the http: and https: in internal links such as style sheets and javascript:

    <link rel='stylesheet' id='avia-grid-css'  href='//www.example.org/wp-content/themes/enfold/css/grid.css' type='text/css' media='all' />
    <script type='text/javascript' src='//www.example.org/wp-includes/js/jquery/jquery.js'></script>

    This way, it doesn’t matter if your website is requested using HTTP:// or https://, it’s protocol independent. See https://css-tricks.com/moving-to-https-on-wordpress/ for more information.

    I think you’re looking at your browser cache, because I don’t see the ?ver=:

    <script type='text/javascript' src='https://www.droidopedia.com/wp-includes/js/wp-embed.min.js'></script>

    Clear your browser cache and do a hard refresh, that should fix that ??

    Hi @droidopedia, your site already feels much faster now with WPSC enabled!

    To remove query strings and version numbers from static resources, use the following code in your theme’s functions.php:

    function saotn_removeQueryStrings( $src ) {
        if( strpos( $src, '?ver=' ) )
            $src = remove_query_arg( 'ver', $src );
        return $src;
    }
    add_filter( 'style_loader_src', 'saotn_removeQueryStrings', 10, 2 );
    add_filter( 'script_loader_src', 'saotn_removeQueryStrings', 10, 2 );

    As for the Facebook like-box, try to find the javascript somewhere in your theme. It looks like:

    <script>(function(d, s, id) {
                  var js, fjs = d.getElementsByTagName(s)[0];
                  if (d.getElementById(id)) {return;}
                  js = d.createElement(s); js.id = id;
                  js.src = "//connect.facebook.net/en_US/all.js#xfbml=1";
                  fjs.parentNode.insertBefore(js, fjs);
                }(document, 'script', 'facebook-jssdk'));</script>

    Now, before js.src =, add: js.async=true;. That’ll make the Facebook like box load asynchronously. Try to do the same for Twitter:

    <script
      src="https://platform.twitter.com/widgets.js"
      type="text/javascript">
    </script>

    needs to have a defer or async:

    <script
      src="https://platform.twitter.com/widgets.js"
      type="text/javascript" defer>
    </script>

    The Google AdSense plugin should do its job good, but haven’t looked into it.

    After making changes to files, clear your WPSC cache ??

    I’d use WP-Super-Cache if I were you, I really like that cache plugin. Further make sure your PHP settings are optimized (realpath_cache_size, opcache), you use at least PHP 5.6, but preferably 7.0, and that MySQL is optimized (InnoDB in MySQL >= 5.5).

    See https://www.saotn.org/mysql-55-innodb-performance-improvement/, https://www.saotn.org/optimize-php-opcache-configuration/ and https://www.saotn.org/optimize-php-performance-check-set-php-realpath_cache_size/ for more information. Also https://www.saotn.org/wordpress-wp-options-table-autoload-micro-optimization/ can make a really huge difference.

    Further I see you use multiple plugins with nearly the same functionality (Adsense Made Easy & Google AdSense). Don’t use two, or more, plugins offering the same functionality. Choose one and lose the other.

    When I browse your site in Google Chrome, and have the webmaster tools enabled (F12), I see the DOMContentLoaded is approx. 1,35 seconds, and the overall load takes 3,2 seconds. Looks like your Google ads aren’t loaded with defer or async, and the Facebook like box takes quite some time to load the external resources.

    Thread Starter Jan Reilink

    (@janr)

    Hi I5hikawa, thanks for your reply!

    I finally went with your solution, which seems to work fine. I made some code changes to the mu-domain-mapping plugin for setting the cookie, but didn’t want to keep running with code changes ??

    Marked as resolved.

    Hi,
    It may take a while, but if the post is removed and returns a 404 not found, the post will automatically disappear from the search engine result pages (SERP). However, you can request Google to remove the post from the SERP through its Search Console. See https://support.google.com/webmasters/answer/6332384?hl=en&rd=1 for more information.

    Hi MrMuffin,

    I browsed through the NetSol WordPress hosting details, and unfortunately I see no way of helping you. For instance, there is no FTP available, thus you cannot edit wp-config.php or your theme’s functions.php to reset the WordPress password to something default.

    All you can do is trying to reset your WordPress website’s password, contacting Network Solutions, or transfer your website away…

    What WordPress version are you using? If >= 3.9.2 your database connection should automatically use mysqli in stead of ext/mysql. Or are you running some plugin that uses its own database functions and not $wpdb?

    86 and 93 can be a lot queries, but can be normal behavior as well. If the number of queries are always (almost) the same after page refreshes, you might want to look into your WordPress caching plugin. Do you have MySQL query cache configured?
    MySQL 5.6 default is to use 8 “innodb_buffer_pool_instances”, which means you need to have 8 times more RAM [1] than your configured “innodb_buffer_pool_size”. However, that would consume all memory and not, as you explain, spike CPU usage. Have you configured PHP’s OPcache feature?

    Suggestions:
    * update WordPress, theme’s and plugins
    * configure PHP’s OPcache, test with APC, Memcache, Redis
    * use a caching plugin like WP-Super-Cache
    * move MySQL to a second VPS if possible
    * configure MySQL query cache
    * check your web server and PHP configuration for odd settings (too many, or too few server processes to start, threads kept spare and so forth)

    [1] https://www.saotn.org/mysql-55-innodb-performance-improvement/

    Hi!

    Unfortunately, it is very difficult to give you valuable advice with so little server information. How are PHP and MySQL configured, what web server and operating system do you use? How large are the databases and what table engine is in use?

    To check whether the problem lies in WordPress, themes or plugins, you can use Debug Objects and/or P3 (Plugin Performance Profiler) for debugging. Further, make sure you’re not using multiple caching plugins (like WP-Super-Cache and W3 Total Cache), and try to use an object cache like APC or Redis.

    Newer MySQL versions require far more RAM than the 4 GB you mention, especially with InnoDB, you might want to look into that as well.

    If Linux is your operating system, you can use top to see CPU and memory usage, free -m for the amount of RAM that is used and available, strace -p <PID> to see what handles a process uses.

    Thread Starter Jan Reilink

    (@janr)

    Marked as resolved, I’ve added an enhancement issue on WPSC GitHub:
    https://github.com/Automattic/wp-super-cache/issues/93

    Hi, thanks for the clarification. For as far as I can tell, setting WP_CONTENT_URL should work for offloading content.

    Are you absolutely sure there is no analytics script or plugin setting a “.example.com” cookie? The dot before your-domain.com means a wildcard: include everything URL ending with example.com, so a cookie URL “.example.com” includes static.example.com.

Viewing 15 replies - 46 through 60 (of 65 total)