Forum Replies Created

Viewing 15 replies - 1 through 15 (of 17 total)
  • Thread Starter te-deum

    (@te-deum)

    Hello,

    Thank you for the complete response !
    By the way, I don’t want to use specific configuration and I want it to work for the whole website.

    So here is my solution because no other options :

    function check_post_url( $post ) {
    	// Current page infos
    	$current_url  = "https://";
    	$current_url .= $_SERVER["HTTP_HOST"];
    	$current_url .= $_SERVER["REQUEST_URI"];
    	$post_url     = get_permalink($post->ID);
    	// Check url vs post url
    	if(!str_starts_with($current_url, $post_url)) {
    		// Add query string if any
    		if(!empty($_SERVER['QUERY_STRING']))
    			$post_url .= '?' . $_SERVER['QUERY_STRING'];
    		header("HTTP/1.1 301 Moved Permanently");
    		header("Location: $post_url");
    		exit();
    	}
    }
    add_action( 'the_post', 'check_post_url' );

    I force HTTPS because htaccess have rules to redirect whole urls to https if not.
    It work as expected.

    There may be a better action hook to use. If so, let me know 🙂

    • This reply was modified 3 years, 4 months ago by te-deum.
    Thread Starter te-deum

    (@te-deum)

    Since my tests, I try to optimize the server without success.
    Here is mysqltuner result on my MySQL server (executed today) :
    >> MySQLTuner 1.6.2 – Major Hayden <[email protected]>
    >> Bug reports, feature requests, and downloads at http://mysqltuner.com/
    >> Run with ‘–help’ for additional options and output filtering
    [–] Skipped version check for MySQLTuner script
    [OK] Currently running supported MySQL version 5.5.44-MariaDB
    [OK] Operating on 64-bit architecture

    ——– Storage Engine Statistics ——————————————-
    [–] Status: +ARCHIVE +Aria +BLACKHOLE +CSV +FEDERATED +InnoDB +MRG_MYISAM
    [–] Data in MyISAM tables: 222M (Tables: 933)
    [–] Data in InnoDB tables: 1G (Tables: 3245)
    [–] Data in MEMORY tables: 0B (Tables: 2)
    [!!] Total fragmented tables: 153

    ——– CVE Security Recommendations ——————————————-
    [–] Skipped due to –cvefile option undefined

    ——– Performance Metrics ————————————————-
    [–] Up for: 28d 11h 39m 38s (120M q [48.901 qps], 1M conn, TX: 486B, RX: 24B)
    [–] Reads / Writes: 96% / 4%
    [–] Binary logging is disabled
    [–] Total buffers: 8.5G global + 16.8M per thread (151 max threads)
    [OK] Maximum reached memory usage: 9.6G (30.78% of installed RAM)
    [OK] Maximum possible memory usage: 10.9G (34.91% of installed RAM)
    [OK] Slow queries: 0% (1K/120M)
    [OK] Highest usage of available connections: 47% (72/151)
    [OK] Aborted connections: 0.02% (214/1277118)
    [OK] Query cache efficiency: 40.8% (75M cached / 185M selects)
    [!!] Query cache prunes per day: 30918
    [OK] Sorts requiring temporary tables: 0% (13 temp sorts / 2M sorts)
    [!!] Joins performed without indexes: 135332
    [!!] Temporary tables created on disk: 60% (1M on disk / 2M total)
    [OK] Thread cache hit rate: 96% (39K created / 1M connections)
    [!!] Table cache hit rate: 0% (4K open / 694K opened)
    [OK] Open file limit used: 7% (1K/24K)
    [OK] Table locks acquired immediately: 99% (40M immediate / 40M locks)

    ——– MyISAM Metrics —————————————————–
    [!!] Key buffer used: 18.3% (1M used / 8M cache)
    [OK] Key buffer size / total MyISAM indexes: 8.0M/68.8M
    [OK] Read Key buffer hit rate: 99.9% (94M cached / 99K reads)
    [!!] Write Key buffer hit rate: 4.2% (2M cached / 2M writes)

    ——– InnoDB Metrics —————————————————–
    [–] InnoDB is enabled.
    [OK] InnoDB buffer pool / data size: 8.0G/1.4G
    [!!] InnoDB buffer pool instances: 4
    [OK] InnoDB Used buffer: 100.00% (524282 used/ 524284 total)
    [OK] InnoDB Read buffer efficiency: 100.00% (31136707612 hits/ 31137314329 total)
    [!!] InnoDB Write buffer efficiency: 0.00% (0 hits/ 1 total)
    [OK] InnoDB log waits: 0.00% (0 waits / 5528856 writes)

    ——– AriaDB Metrics —————————————————–
    [–] AriaDB is disabled.

    ——– Replication Metrics ————————————————-
    [–] No replication slave(s) for this server.
    [–] This is a standalone server..

    ——– Recommendations —————————————————–
    General recommendations:
    Run OPTIMIZE TABLE to defragment tables for better performance
    Enable the slow query log to troubleshoot bad queries
    Adjust your join queries to always utilize indexes
    Temporary table size is already large – reduce result set size
    Reduce your SELECT DISTINCT queries without LIMIT clauses
    Increase table_open_cache gradually to avoid file descriptor limits
    Read this before increasing table_open_cache over 64: http://bit.ly/1mi7c4C
    Beware that open_files_limit (24000) variable
    should be greater than table_open_cache ( 4096)
    Variables to adjust:
    query_cache_size (> 64M)
    join_buffer_size (> 128.0K, or always use indexes with joins)
    table_open_cache (> 4096)
    innodb_buffer_pool_instances(=8)

    te-deum

    (@te-deum)

    Hello,

    After some debug/test, I find where the problem is. It is Piwik that send a header command to set response as text/plain instead of text/html.
    The function that send the header command is in /core/DataTable/Renderer.php :

    /**
         * Output HTTP Content-Type header
         */
        protected function renderHeader()
        {
            @header('Content-Type: text/plain; charset=utf-8');
        }

    If I comment the line, I retrieve my WordPress panel…
    I hope that this will help 🙂

    Regards.

    te-deum

    (@te-deum)

    te-deum

    (@te-deum)

    Hello,

    I have the same issue with my own WordPress Network when I use WP-Piwik in PHP mode. I try per website config and network wide configuration. Both mode give the same result text/plain content-type instead of text/html.

    I try to desactivate every plugin to find wich plugin is problematic and I have the same result. I will try to find why later (it might be a network plugin).

    Regards.

    Thread Starter te-deum

    (@te-deum)

    Re,

    Ok for the FAQ and register_sidebar. But in your FAQ, you say that the important thing is that we can add class to container BUT your code is looking for both class AND set the value to id 😉

    I change my template to have both class and id and now it’s Ok. Previously, I was only adding class and not id.

    Thank you for your great work !

    Regards.

    Thread Starter te-deum

    (@te-deum)

    While I was writting my message, I realise that rewrite rules is not like BWP show the link !

    BWP show a link.xml link instead of links.xml as I wrote.
    I change my code to :

    add_filter('bwp_gxs_rewrite_rules', 'add_rewrite_rules');
    function add_rewrite_rules()
    {
    	$my_rules = array(
    		'link\.xml' => 'index.php?gxs_module=link'
    	);
    	return $my_rules;
    }

    And everything is now working perfectly.

    Thank you to the team for this great plugin.

    Hello,

    Personnaly, I have deleted every object-cache.php inside the wp-content folder and everything is Ok.

    By deleting the object-cache.php file, you will not have object and data caching but you will have PHP OpCode cached (even for wp-admin/*.php scripts) and everything will work perfectly and speedier 😉

    I hope this will help, Regards.

    PS : I have tried above solutions without success or without having admin optimisation !

    Hello,

    I have the same problem on my own installation. I finally deactivate APC on the server because there is too much problem.

    In fact, while changing options in WP-Admin (like template, options, plugin activation/deactivation, etc…) changes are applied and then disappear !? But changes are stored into the database !

    Deactivate APC for back-end only is not an option (for me) because it seems to have the same issue (I filter directly from APC with apc.filters).

    My configuration :

    • Ubuntu : 12.04.1 LTS
    • Virtualmin 4.00 / Webmin 1.63
    • PHP : 5.3.10
    • APC : 3.1.7
    • WordPress : 3.5.1

    I can give more information if needed…

    If anyone have an idea 🙂

    Regards.

    Thread Starter te-deum

    (@te-deum)

    Hello,

    I have updated to 7.2.9 and I don’t have any problem !

    Thank you very much @john Lamansky

    Thread Starter te-deum

    (@te-deum)

    Hello,

    I have commented all the file and now it works !

    Thank you @robbodevnz 🙂

    te-deum

    (@te-deum)

    Hello,

    It was not working for me too, but I have changed one line in the code and all was working great.

    Edit the file (via FTP) /wp-content/plugins/underconstruction/ucOptions.php and change line 155 :
    FROM :
    action="<?php echo $GLOBALS['PHP_SELF'] . '?page=' . $this->mainOptionsPage; ?>"
    TO
    action=""

    I hope that this will help 🙂

    te-deum

    (@te-deum)

    Hello,

    It was not working for me too, but I have changed one line in the code and all was working great.

    Edit the file (via FTP) /wp-content/plugins/underconstruction/ucOptions.php and change line 155 :
    FROM :
    action="<?php echo $GLOBALS['PHP_SELF'] . '?page=' . $this->mainOptionsPage; ?>"
    TO
    action=""

    I hope that this will help 🙂

    @pothi Kalimuthu : The post has been originally opened by @cole20444

    Regards.

    The Dev version is working for me.
    Thank you for your reactivity !!

    Regards.

Viewing 15 replies - 1 through 15 (of 17 total)