Welcome to Centmin Mod Community
Become a Member

Wordpress Can i use PHP 7.X with Wordpress ?

Discussion in 'Blogs & CMS usage' started by Yohan, Oct 5, 2015.

Tags:
  1. Yohan

    Yohan Member

    68
    3
    8
    Sep 24, 2015
    Ratings:
    +4
    Local Time:
    5:26 PM
    1.9.x
    MariaDB 10
    Hello , im using letest WP and Centmin MOD ... can i upgrade to PHP to 7.0 and will it brake WP site ?

     
  2. rdan

    rdan Well-Known Member

    5,451
    1,412
    113
    May 25, 2014
    Ratings:
    +2,206
    Local Time:
    7:56 PM
    Mainline
    10.2
    I'm using PHP 7.0 from RC1 up until now RC4 without any problem.
    But the only 3rd party module I tested and use for more than a month is memcached.
     
  3. eva2000

    eva2000 Administrator Staff Member

    55,801
    12,271
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,857
    Local Time:
    9:56 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
  4. Yohan

    Yohan Member

    68
    3
    8
    Sep 24, 2015
    Ratings:
    +4
    Local Time:
    5:26 PM
    1.9.x
    MariaDB 10
    :) really ? do you have any test URL or live site ? you can PM me .. and will Centmin MOD menus working ? i saw some post mention WP auto install menu not work .. ?

    Actually what this redis ? and how it can be impact to site and if you can maybe give me suggest for server setup with centmin MOD and best server configuration ?
     
  5. Yohan

    Yohan Member

    68
    3
    8
    Sep 24, 2015
    Ratings:
    +4
    Local Time:
    5:26 PM
    1.9.x
    MariaDB 10
    Like i was recently check about HHVM and PHP 7 .. its like Good implement so far .. to focus on PHP 7 then HHVM ... :) waiting suggest !!
     
  6. rdan

    rdan Well-Known Member

    5,451
    1,412
    113
    May 25, 2014
    Ratings:
    +2,206
    Local Time:
    7:56 PM
    Mainline
    10.2
    Eva already gave Live site :)
    Yes except WP Menu #22.
     
  7. eva2000

    eva2000 Administrator Staff Member

    55,801
    12,271
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,857
    Local Time:
    9:56 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    yes centmin mod centmin.sh menu option 22 doesn't work with PHP 7 as wp-cli isn't PHP7 compatible, so if you want to use centmin.sh menu option 22, run it on PHP 5.6 first and after wp setup then update to PHP 7 and be sure to disable auto update wp cronjob that centmin.sh menu option 22 creates as WP-CLI doesn't work in cronjob for PHP 7
     
  8. Yohan

    Yohan Member

    68
    3
    8
    Sep 24, 2015
    Ratings:
    +4
    Local Time:
    5:26 PM
    1.9.x
    MariaDB 10
    So then can i go ahead and upgrade PHP 7 ? i should run 7.0.0RC4 ?
     
  9. Yohan

    Yohan Member

    68
    3
    8
    Sep 24, 2015
    Ratings:
    +4
    Local Time:
    5:26 PM
    1.9.x
    MariaDB 10
    Ohh ... actualy im still testing server with my one site on .. so i can upgrade and check the performance and will downgrade when i need add other domains .. its that work right ?
     
  10. eva2000

    eva2000 Administrator Staff Member

    55,801
    12,271
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,857
    Local Time:
    9:56 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    for WP redis caching, there's 3 (4th optional) steps
    1. install redis server
    2. install redis object cache wp plugin
    3. setup nginx level redis full page caching
    4. optional step setup PHP session storage via redis
    but step 2 and 4 don't work with PHP 7
    try a test site so you can test if the plugins you use with wordpress work on php 7
     
  11. eva2000

    eva2000 Administrator Staff Member

    55,801
    12,271
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,857
    Local Time:
    9:56 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    yeah downgrade PHP to 5.6 if needed
     
  12. Yohan

    Yohan Member

    68
    3
    8
    Sep 24, 2015
    Ratings:
    +4
    Local Time:
    5:26 PM
    1.9.x
    MariaDB 10
    Cool !! let me try..
     
  13. Yohan

    Yohan Member

    68
    3
    8
    Sep 24, 2015
    Ratings:
    +4
    Local Time:
    5:26 PM
    1.9.x
    MariaDB 10
    Updating in pregresss .... while can i know what dose OpenLiteSpeed ? can i install it ?
     
  14. Yohan

    Yohan Member

    68
    3
    8
    Sep 24, 2015
    Ratings:
    +4
    Local Time:
    5:26 PM
    1.9.x
    MariaDB 10
    Code:
    PHP 7.0 detected.. remove unsupported PHP extensions manually
    by removing their ini files:
    ***************************************************
    
    rm -rf /etc/centminmod/php.d/igbinary.ini
    #rm -rf /etc/centminmod/php.d/imagick.ini
    rm -rf /etc/centminmod/php.d/memcache.ini
    rm -rf /etc/centminmod/php.d/mongodb.ini
    rm -rf /etc/centminmod/php.d/redis.ini
    rm -rf /etc/centminmod/php.d/suhosin.ini
    
    then restart PHP-FPM again...
    
    Do i need RUN that comment ?
     
  15. eva2000

    eva2000 Administrator Staff Member

    55,801
    12,271
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,857
    Local Time:
    9:56 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    there's no official OLS support in centmin mod right now
    yes
     
  16. Yohan

    Yohan Member

    68
    3
    8
    Sep 24, 2015
    Ratings:
    +4
    Local Time:
    5:26 PM
    1.9.x
    MariaDB 10
    its mean PHP 7 wont effect until i do that and restart PHP-FPM ?
     
  17. eva2000

    eva2000 Administrator Staff Member

    55,801
    12,271
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,857
    Local Time:
    9:56 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    php 7 still runs just restart command gives errors until you remove those incompatible php extension ini files
     
  18. Yohan

    Yohan Member

    68
    3
    8
    Sep 24, 2015
    Ratings:
    +4
    Local Time:
    5:26 PM
    1.9.x
    MariaDB 10
    OK i Noticed !! thanks you :) and one more question .. i have kind of issue when i 1st time try to login in to WP dashboard its talking around 5 ,7 second to load and my WP site has 12K post ... however i did MySQL tuning but its wont FIX this issue .. what do you thing this issue relented ? ( Rest of site loading fine )
     
  19. eva2000

    eva2000 Administrator Staff Member

    55,801
    12,271
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,857
    Local Time:
    9:56 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    no idea to be honest
     
  20. Yohan

    Yohan Member

    68
    3
    8
    Sep 24, 2015
    Ratings:
    +4
    Local Time:
    5:26 PM
    1.9.x
    MariaDB 10
    do you have any idea with below information ?

    Code:
    MySQL server was started
    Uptime: 1 day 17 hours 16 min 50 sec
    Uptime 148610
    Uptime_since_flush_status 148610
    
    Max Used Connections:      7/300 (2.33%)
    Key Buffer Used:           26.16M/32.00M (81.74%)
    Key Buffer Used:           2.27M/8.00M (28.32%)
    Current Key Buffer Usage:  32.00M (100.00%)
    Current Key Buffer Usage:  336.00k (4.10%)
    Query Cache:               25.31M/1.00G (2.47%)
    Table Locks Waited:        418 Rate: 0.0/s (0.02%)
    --------------------
    Query Cache Limit (bytes): 268435456
    Query Cache Min Unit (bytes): 2048
    Query Cache Size (bytes): 1073741824
    Query Cache Free Mem (bytes): 1047199744
    Query Cache Used Mem (bytes): 26542080
    Queries in Query Cache: 1
    Query Cache Avg Size (bytes): 26542080
    

    Code:
    MySQL datadir disk usage
    ----------------------------
    /var/lib/mysql/ uses 896872 kilobytes of disk space
    
    ----------------------------
    mysqlreport output
    ----------------------------
    
    MariaDB 10.0.21-MariaDB     uptime 1 17:17:45   Mon Oct  5 10:28:25 2015
    
    __ Key _________________________________________________________________
    Buffer used    26.16M of   32.00M   %Used:  81.74
      Current      32.00M              %Usage: 100.00
    Write hit      29.58%
    Read hit       97.89%
    
    __ Questions ___________________________________________________________
    Total           5.56M      37.4/s
      DMS           5.21M      35.0/s  %Total:  93.68
      -Unknown      3.75M      25.2/s           67.49
      QC Hits       3.75M      25.2/s           67.49
      Com_        234.61k       1.6/s            4.22
      COM_QUIT    116.44k       0.8/s            2.09
    Slow 1 s       13.63k       0.1/s            0.25  %DMS:   0.26 Log:
    DMS             5.21M      35.0/s           93.68
      SELECT        5.19M      34.9/s           93.36         99.66
      UPDATE        9.64k       0.1/s            0.17          0.19
      INSERT        5.65k       0.0/s            0.10          0.11
      DELETE        2.52k       0.0/s            0.05          0.05
      REPLACE           0         0/s            0.00          0.00
    Com_          234.61k       1.6/s            4.22
      set_option  116.38k       0.8/s            2.09
      change_db   116.38k       0.8/s            2.09
      show_fields   1.51k       0.0/s            0.03
    
    __ Rows ________________________________________________________________
    Rows           47.99G    322.8k/s
      Using idx    37.85G    254.6k/s  %Index:  78.88
    Rows/question   8.63k
    
    __ SELECT and Sort _____________________________________________________
    Scan           15.51k       0.1/s %SELECT:   0.30
    Range         310.48k       2.1/s            5.98
    Full join           0         0/s            0.00
    Range check         0         0/s            0.00
    Full rng join       0         0/s            0.00
    Sort scan     523.80k       3.5/s
    Sort range    283.43k       1.9/s
    Sort mrg pass  51.66k       0.3/s
    
    __ Query Cache _________________________________________________________
    Memory usage   26.46M of    1.00G  %Usage:   2.58
    Block Fragmnt  17.78%
    Hits            3.75M      25.2/s
    Inserts         1.22M       8.2/s
    Insrt:Prune   1.22M:1       8.2/s
    Hit:Insert     3.07:1
    
    __ Table Locks _________________________________________________________
    Waited            418       0.0/s  %Total:   0.02
    Immediate       2.33M      15.7/s
    
    __ Tables ______________________________________________________________
    Open              144 of   2048    %Cache:   7.03
    Opened            148       0.0/s
    
    __ Connections _________________________________________________________
    Max used            7 of    300      %Max:   2.33
    Total         116.44k       0.8/s
    
    __ Created Temp ________________________________________________________
    Disk table    394.48k       2.7/s   %Disk:  76.77
    Table         513.83k       3.5/s    Size: 256.0M
    File           84.10k       0.6/s
    
    __ Threads _____________________________________________________________
    Running             2 of      2
    Created             7       0.0/s
    Slow                0         0/s
    Cached              5 of     64      %Hit:  99.99
    
    __ Aborted _____________________________________________________________
    Clients             0         0/s
    Connects            1       0.0/s
    
    __ Bytes _______________________________________________________________
    Sent           39.18G    263.6k/s
    Received      738.88M      5.0k/s
    
    __ InnoDB Buffer Pool __________________________________________________
    Usage           8.45M of   47.98M  %Usage:  17.62
    Read hit       99.45%
    Pages
      Free          2.53k              %Total:  82.38
      Data            540                       17.58  %Drty:   0.00
      Misc              1                        0.03
      Latched           0                        0.00
    Reads          74.86k       0.5/s
      From disk       409       0.0/s   %Disk:   0.55
      Ahead Rnd         0         0/s
    Writes          9.88k       0.1/s
    Flushes         2.06k       0.0/s
    Wait Free           0         0/s   %Wait:   0.00
    
    __ InnoDB Lock _________________________________________________________
    Waits               0         0/s
    Current             0
    Time acquiring
      Total             0 ms
      Average           0 ms
      Max               0 ms
    
    __ InnoDB Data, Pages, Rows ____________________________________________
    Data
      Reads           425       0.0/s
      Writes        3.71k       0.0/s
      fsync           559       0.0/s
      Pending
        Reads           0
        Writes          0
        fsync           0
    
    Pages
      Created         132       0.0/s
      Read            408       0.0/s
      Written       2.06k       0.0/s
    
    Rows
      Deleted          27       0.0/s
      Inserted        264       0.0/s
      Read         20.69k       0.1/s
      Updated         954       0.0/s
    
    __ Aria Pagecache ______________________________________________________
    Buffer used     2.27M of    8.00M   %Used:  28.32
      Current     336.00k              %Usage:   4.10
    Write hit     100.00%
    Read hit       97.56%
    
    Code:
    MySQL settings
    ----------------------------
    [mysqld]
    local-infile=0
    ignore-db-dir=lost+found
    #character-set-server=utf8
    datadir=/var/lib/mysql
    socket=/var/lib/mysql/mysql.sock
    
    #bind-address=127.0.0.1
    # optimized my.cnf for MariaDB 5.5.x
    # by eva2000
    # vbtechsupport.com
    
    tmpdir=/home/mysqltmp
    
    innodb=ON
    #skip-federated
    #skip-pbxt
    #skip-pbxt_statistics
    #skip-archive
    #skip-name-resolve
    #old_passwords
    back_log = 75
    max_connections = 300
    key_buffer_size = 32M
    myisam_sort_buffer_size = 32M
    myisam_max_sort_file_size = 2048M
    join_buffer_size = 128K
    read_buffer_size = 128K
    sort_buffer_size = 256K
    table_definition_cache = 4096
    table_open_cache = 2048
    thread_cache_size = 64
    wait_timeout = 120
    connect_timeout = 10
    tmp_table_size = 256M
    max_heap_table_size = 256M
    max_allowed_packet = 32M
    max_seeks_for_key = 1000
    group_concat_max_len = 1024
    max_length_for_sort_data = 1024
    net_buffer_length = 16384
    max_connect_errors = 100000
    concurrent_insert = 2
    read_rnd_buffer_size = 256K
    bulk_insert_buffer_size = 8M
    query_cache_limit = 256m
    query_cache_size = 1024M
    query_cache_type = 1
    query_cache_min_res_unit = 2K
    query_prealloc_size = 262144
    query_alloc_block_size = 65536
    transaction_alloc_block_size = 8192
    transaction_prealloc_size = 4096
    default-storage-engine = InnoDB
    
    log_warnings=1
    slow_query_log=0
    long_query_time=1
    slow_query_log_file=/var/lib/mysql/slowq.log
    log-error=/var/log/mysqld.log
    
    # innodb settings
    innodb_large_prefix=1
    innodb_purge_threads=1
    innodb_file_format = Barracuda
    innodb_file_per_table = 1
    innodb_open_files = 1000
    innodb_data_file_path= ibdata1:10M:autoextend
    innodb_buffer_pool_size = 48M
    
    ## https://mariadb.com/kb/en/mariadb/xtradbinnodb-server-system-variables/#innodb_buffer_pool_instances
    #innodb_buffer_pool_instances=2
    
    innodb_log_files_in_group = 2
    innodb_log_file_size = 128M
    innodb_log_buffer_size = 8M
    innodb_flush_log_at_trx_commit = 2
    innodb_thread_concurrency = 0
    innodb_lock_wait_timeout=50
    innodb_flush_method = O_DIRECT
    innodb_support_xa=1
    
    # 200 * # DISKS
    innodb_io_capacity = 100
    innodb_read_io_threads = 2
    innodb_write_io_threads = 2
    
    # mariadb settings
    [mariadb]
    #thread-handling = pool-of-threads
    #thread-pool-size= 20
    #mysql --port=3307 --protocol=tcp
    #extra-port=3307
    #extra-max-connections=1
    
    userstat = 0
    key_cache_segments = 1
    aria_group_commit = none
    aria_group_commit_interval = 0
    aria_log_file_size = 32M
    aria_log_purge_type = immediate
    aria_pagecache_buffer_size = 8M
    aria_sort_buffer_size = 8M
    
    [mariadb-5.5]
    #ignore_db_dirs=
    query_cache_strip_comments=0
    
    innodb_read_ahead = linear
    innodb_adaptive_flushing_method = estimate
    innodb_flush_neighbor_pages = 1
    innodb_stats_update_need_lock = 0
    innodb_log_block_size = 512
    
    log_slow_filter =admin,filesort,filesort_on_disk,full_join,full_scan,query_cache,query_cache_miss,tmp_table,tmp_table_on_disk
    
    [mysqld_safe]
    socket=/var/lib/mysql/mysql.sock
    log-error=/var/log/mysqld.log
    #nice = -5
    open-files-limit = 8192
    
    [mysqldump]
    quick
    max_allowed_packet = 32M
    
    [myisamchk]
    tmpdir=/home/mysqltmp
    key_buffer = 32M
    sort_buffer = 16M
    read_buffer = 16M
    write_buffer = 16M
    
    [mysqlhotcopy]
    interactive-timeout
    
    [mariadb-10.0]
    # 2 variables needed to switch from XtraDB to InnoDB plugins
    #plugin-load=ha_innodb
    #ignore_builtin_innodb
    
    ## MariaDB 10 only save and restore buffer pool pages
    ## warm up InnoDB buffer pool on server restarts
    innodb_buffer_pool_dump_at_shutdown=1
    innodb_buffer_pool_load_at_startup=1
    innodb_buffer_pool_populate=0
    ## Disabled settings
    performance_schema=OFF
    innodb_stats_on_metadata=OFF
    innodb_sort_buffer_size=2M
    innodb_online_alter_log_max_size=128M
    query_cache_strip_comments=0
    log_slow_filter =admin,filesort,filesort_on_disk,full_join,full_scan,query_cache,query_cache_miss,tmp_table,tmp_table_on_disk
    ---