• Resolved Aggravated Badger

    (@tehcook)


    Hi, love the plugin! We would like to use the post title as the focus keyword for our articles, but whenever we paste the following code from your website (https://rankmath.com/kb/how-to-automate-the-insertion-of-focus-keyword/) into functions.php of either in the theme or rank math the back-end admin panel breaks. Please advice ??

    /**
     * Function to automatically update the focus keyword with the post title
     */
    function update_focus_keywords()
    {
        $posts = get_posts(array(
            'posts_per_page'    => -1,
            'post_type'        => 'post' //replace post with the name of your post type
        ));
        foreach ($posts as $p) {
            update_post_meta($p->ID, 'rank_math_focus_keyword', strtolower(get_the_title($p->ID)));
        }
    }
    add_action('init', 'update_focus_keywords');
    

    The page I need help with: [log in to see the link]

Viewing 9 replies - 1 through 9 (of 9 total)
  • Plugin Support Rank Math Support

    (@rankmathsupport)

    Hello @tehcook,

    Please make sure that the code is wrapped inside the PHP opening and closing tag (<?php [your code here...] ?>).

    Alternatively, you may refer to this guide for more options on adding filters to your website: https://rankmath.com/kb/wordpress-hooks-actions-filters/

    If the issue persists, please share your website’s recent error logs so we can determine what’s causing the issue.

    Looking forward to helping you.

    Thread Starter Aggravated Badger

    (@tehcook)

    Thank you for replying back. I did paste the following code into rank math’s functions.php and still ”breaks” the website. I’ve pasted the last errors from the log file. Hope it helps! Also posting the System Info from Rank math plugin.

    <?php
    	
    	/**
     * Function to automatically update the focus keyword with the post title
     */
    function update_focus_keywords()
    {
        $posts = get_posts(array(
            'posts_per_page'    => -1,
            'post_type'        => 'post' //replace post with the name of your post type
        ));
        foreach ($posts as $p) {
            update_post_meta($p->ID, 'rank_math_focus_keyword', strtolower(get_the_title($p->ID)));
        }
    }
    add_action('init', 'update_focus_keywords'); 
    
    ?>
    2023-10-31 17:29:34	WARNING: [pool cineramen.gr] child 25948 said into stderr: "PHP message: 71389646 dom-filters Kibo\Phast\Filters\HTML\Composite\Filter 230 Phast: CompositeHTMLFilter: PDOException Msg: SQLSTATE[HY000]: General error: 1 near "WITHOUT": syntax error, Code: HY000, File: /var/www/vhosts/cineramen.gr/httpdocs/wp-content/plugins/phastpress/sdk/phast.php, Line: 230"
    2023-10-31 17:29:40	WARNING: [pool cineramen.gr] child 25948 said into stderr: "PHP message: 33612784 dom-filters Kibo\Phast\Cache\Sqlite\Manager Caught PDOException during cache operation: SQLSTATE[HY000]: General error: 1 near "WITHOUT": syntax error; retrying operation"
    2023-10-31 17:29:40	WARNING: [pool cineramen.gr] child 25948 said into stderr: "PHP message: 33612784 dom-filters Kibo\Phast\Filters\HTML\Composite\Filter 230 Phast: CompositeHTMLFilter: PDOException Msg: SQLSTATE[HY000]: General error: 1 near "WITHOUT": syntax error, Code: HY000, File: /var/www/vhosts/cineramen.gr/httpdocs/wp-content/plugins/phastpress/sdk/phast.php, Line: 230"
    2023-10-31 17:29:43	WARNING: [pool cineramen.gr] child 21627 said into stderr: "PHP message: 22834749 dom-filters Kibo\Phast\Cache\Sqlite\Manager Caught PDOException during cache operation: SQLSTATE[HY000]: General error: 1 near "WITHOUT": syntax error; retrying operation"
    2023-10-31 17:29:43	WARNING: [pool cineramen.gr] child 21627 said into stderr: "PHP message: 22834749 dom-filters Kibo\Phast\Filters\HTML\Composite\Filter 230 Phast: CompositeHTMLFilter: PDOException Msg: SQLSTATE[HY000]: General error: 1 near "WITHOUT": syntax error, Code: HY000, File: /var/www/vhosts/cineramen.gr/httpdocs/wp-content/plugins/phastpress/sdk/phast.php, Line: 230"
    2023-10-31 17:29:46	WARNING: [pool cineramen.gr] child 21627 said into stderr: "PHP message: 26724398 dom-filters Kibo\Phast\Cache\Sqlite\Manager Caught PDOException during cache operation: SQLSTATE[HY000]: General error: 1 near "WITHOUT": syntax error; retrying operation"
    2023-10-31 17:29:46	WARNING: [pool cineramen.gr] child 21627 said into stderr: "PHP message: 26724398 dom-filters Kibo\Phast\Filters\HTML\Composite\Filter 230 Phast: CompositeHTMLFilter: PDOException Msg: SQLSTATE[HY000]: General error: 1 near "WITHOUT": syntax error, Code: HY000, File: /var/www/vhosts/cineramen.gr/httpdocs/wp-content/plugins/phastpress/sdk/phast.php, Line: 230"
    2023-10-31 17:29:50	WARNING: [pool cineramen.gr] child 21627 said into stderr: "PHP message: 65796253 dom-filters Kibo\Phast\Cache\Sqlite\Manager Caught PDOException during cache operation: SQLSTATE[HY000]: General error: 1 near "WITHOUT": syntax error; retrying operation"
    2023-10-31 17:29:50	WARNING: [pool cineramen.gr] child 21627 said into stderr: "PHP message: 65796253 dom-filters Kibo\Phast\Filters\HTML\Composite\Filter 230 Phast: CompositeHTMLFilter: PDOException Msg: SQLSTATE[HY000]: General error: 1 near "WITHOUT": syntax error, Code: HY000, File: /var/www/vhosts/cineramen.gr/httpdocs/wp-content/plugins/phastpress/sdk/phast.php, Line: 230"
    2023-10-31 17:29:50	WARNING: [pool cineramen.gr] child 26111 said into stderr: "PHP message: 9394163 dom-filters Kibo\Phast\Cache\Sqlite\Manager Caught PDOException during cache operation: SQLSTATE[HY000]: General error: 1 near "WITHOUT": syntax error; retrying operation"
    2023-10-31 17:29:50	WARNING: [pool cineramen.gr] child 26111 said into stderr: "PHP message: 9394163 dom-filters Kibo\Phast\Filters\HTML\Composite\Filter 230 Phast: CompositeHTMLFilter: PDOException Msg: SQLSTATE[HY000]: General error: 1 near "WITHOUT": syntax error, Code: HY000, File: /var/www/vhosts/cineramen.gr/httpdocs/wp-content/plugins/phastpress/sdk/phast.php, Line: 230"
    2023-10-31 17:29:54	WARNING: [pool cineramen.gr] child 25948 said into stderr: "PHP message: 80045288 dom-filters Kibo\Phast\Cache\Sqlite\Manager Caught PDOException during cache operation: SQLSTATE[HY000]: General error: 1 near "WITHOUT": syntax error; retrying operation"
    2023-10-31 17:29:54	WARNING: [pool cineramen.gr] child 25948 said into stderr: "PHP message: 80045288 dom-filters Kibo\Phast\Filters\HTML\Composite\Filter 230 Phast: CompositeHTMLFilter: PDOException Msg: SQLSTATE[HY000]: General error: 1 near "WITHOUT": syntax error, Code: HY000, File: /var/www/vhosts/cineramen.gr/httpdocs/wp-content/plugins/phastpress/sdk/phast.php, Line: 230"
    2023-10-31 17:29:55	WARNING: [pool cineramen.gr] child 21627 said into stderr: "PHP message: 62008014 dom-filters Kibo\Phast\Cache\Sqlite\Manager Caught PDOException during cache operation: SQLSTATE[HY000]: General error: 1 near "WITHOUT": syntax error; retrying operation"
    2023-10-31 17:29:55	WARNING: [pool cineramen.gr] child 21627 said into stderr: "PHP message: 62008014 dom-filters Kibo\Phast\Filters\HTML\Composite\Filter 230 Phast: CompositeHTMLFilter: PDOException Msg: SQLSTATE[HY000]: General error: 1 near "WITHOUT": syntax error, Code: HY000, File: /var/www/vhosts/cineramen.gr/httpdocs/wp-content/plugins/phastpress/sdk/phast.php, Line: 230"
    2023-10-31 17:30:03	WARNING: [pool cineramen.gr] child 26111 said into stderr: "PHP message: 18458062 dom-filters Kibo\Phast\Cache\Sqlite\Manager Caught PDOException during cache operation: SQLSTATE[HY000]: General error: 1 near "WITHOUT": syntax error; retrying operation"
    2023-10-31 17:30:03	WARNING: [pool cineramen.gr] child 26111 said into stderr: "PHP message: 18458062 dom-filters Kibo\Phast\Filters\HTML\Composite\Filter 230 Phast: CompositeHTMLFilter: PDOException Msg: SQLSTATE[HY000]: General error: 1 near "WITHOUT": syntax error, Code: HY000, File: /var/www/vhosts/cineramen.gr/httpdocs/wp-content/plugins/phastpress/sdk/phast.php, Line: 230"
    2023-10-31 17:30:06	WARNING: [pool cineramen.gr] child 21627 said into stderr: "PHP message: 34486804 dom-filters Kibo\Phast\Cache\Sqlite\Manager Caught PDOException during cache operation: SQLSTATE[HY000]: General error: 1 near "WITHOUT": syntax error; retrying operation"
    2023-10-31 17:30:06	WARNING: [pool cineramen.gr] child 21627 said into stderr: "PHP message: 34486804 dom-filters Kibo\Phast\Filters\HTML\Composite\Filter 230 Phast: CompositeHTMLFilter: PDOException Msg: SQLSTATE[HY000]: General error: 1 near "WITHOUT": syntax error, Code: HY000, File: /var/www/vhosts/cineramen.gr/httpdocs/wp-content/plugins/phastpress/sdk/phast.php, Line: 230"
    2023-10-31 17:30:06	WARNING: [pool cineramen.gr] child 25948 said into stderr: "PHP message: 26448921 dom-filters Kibo\Phast\Cache\Sqlite\Manager Caught PDOException during cache operation: SQLSTATE[HY000]: General error: 1 near "WITHOUT": syntax error; retrying operation"
    2023-10-31 17:30:06	WARNING: [pool cineramen.gr] child 25948 said into stderr: "PHP message: 26448921 dom-filters Kibo\Phast\Filters\HTML\Composite\Filter 230 Phast: CompositeHTMLFilter: PDOException Msg: SQLSTATE[HY000]: General error: 1 near "WITHOUT": syntax error, Code: HY000, File: /var/www/vhosts/cineramen.gr/httpdocs/wp-content/plugins/phastpress/sdk/phast.php, Line: 230"
    2023-10-31 17:30:06	WARNING: [pool cineramen.gr] child 28523 said into stderr: "PHP message: 76906785 dom-filters Kibo\Phast\Cache\Sqlite\Manager Caught PDOException during cache operation: SQLSTATE[HY000]: General error: 1 near "WITHOUT": syntax error; retrying operation"
    2023-10-31 17:30:06	WARNING: [pool cineramen.gr] child 28523 said into stderr: "PHP message: 76906785 dom-filters Kibo\Phast\Filters\HTML\Composite\Filter 230 Phast: CompositeHTMLFilter: PDOException Msg: SQLSTATE[HY000]: General error: 1 near "WITHOUT": syntax error, Code: HY000, File: /var/www/vhosts/cineramen.gr/httpdocs/wp-content/plugins/phastpress/sdk/phast.php, Line: 230"
    2023-10-31 17:30:20	WARNING: [pool cineramen.gr] child 28523 said into stderr: "PHP message: 40035102 dom-filters Kibo\Phast\Cache\Sqlite\Manager Caught PDOException during cache operation: SQLSTATE[HY000]: General error: 1 near "WITHOUT": syntax error; retrying operation"
    2023-10-31 17:30:20	WARNING: [pool cineramen.gr] child 28523 said into stderr: "PHP message: 40035102 dom-filters Kibo\Phast\Filters\HTML\Composite\Filter 230 Phast: CompositeHTMLFilter: PDOException Msg: SQLSTATE[HY000]: General error: 1 near "WITHOUT": syntax error, Code: HY000, File: /var/www/vhosts/cineramen.gr/httpdocs/wp-content/plugins/phastpress/sdk/phast.php, Line: 230"
    2023-10-31 17:30:20	WARNING: [pool cineramen.gr] child 26111 said into stderr: "PHP message: 55269075 dom-filters Kibo\Phast\Cache\Sqlite\Manager Caught PDOException during cache operation: SQLSTATE[HY000]: General error: 1 near "WITHOUT": syntax error; retrying operation"
    2023-10-31 17:30:20	WARNING: [pool cineramen.gr] child 26111 said into stderr: "PHP message: 55269075 dom-filters Kibo\Phast\Filters\HTML\Composite\Filter 230 Phast: CompositeHTMLFilter: PDOException Msg: SQLSTATE[HY000]: General error: 1 near "WITHOUT": syntax error, Code: HY000, File: /var/www/vhosts/cineramen.gr/httpdocs/wp-content/plugins/phastpress/sdk/phast.php, Line: 230"
    2023-10-31 17:30:28	WARNING: [pool cineramen.gr] child 26111 said into stderr: "PHP message: 74810290 dom-filters Kibo\Phast\Cache\Sqlite\Manager Caught PDOException during cache operation: SQLSTATE[HY000]: General error: 1 near "WITHOUT": syntax error; retrying operation"
    2023-10-31 17:30:28	WARNING: [pool cineramen.gr] child 26111 said into stderr: "PHP message: 74810290 dom-filters Kibo\Phast\Filters\HTML\Composite\Filter 230 Phast: CompositeHTMLFilter: PDOException Msg: SQLSTATE[HY000]: General error: 1 near "WITHOUT": syntax error, Code: HY000, File: /var/www/vhosts/cineramen.gr/httpdocs/wp-content/plugins/phastpress/sdk/phast.php, Line: 230"
    2023-10-31 17:30:36	WARNING: [pool cineramen.gr] child 28523 said into stderr: "PHP message: 76912841 dom-filters Kibo\Phast\Cache\Sqlite\Manager Caught PDOException during cache operation: SQLSTATE[HY000]: General error: 1 near "WITHOUT": syntax error; retrying operation"
    2023-10-31 17:30:36	WARNING: [pool cineramen.gr] child 28523 said into stderr: "PHP message: 76912841 dom-filters Kibo\Phast\Filters\HTML\Composite\Filter 230 Phast: CompositeHTMLFilter: PDOException Msg: SQLSTATE[HY000]: General error: 1 near "WITHOUT": syntax error, Code: HY000, File: /var/www/vhosts/cineramen.gr/httpdocs/wp-content/plugins/phastpress/sdk/phast.php, Line: 230"
    2023-10-31 17:30:40	WARNING: [pool cineramen.gr] child 28523 said into stderr: "PHP message: 79257978 dom-filters Kibo\Phast\Cache\Sqlite\Manager Caught PDOException during cache operation: SQLSTATE[HY000]: General error: 1 near "WITHOUT": syntax error; retrying operation"
    2023-10-31 17:30:40	WARNING: [pool cineramen.gr] child 28523 said into stderr: "PHP message: 79257978 dom-filters Kibo\Phast\Filters\HTML\Composite\Filter 230 Phast: CompositeHTMLFilter: PDOException Msg: SQLSTATE[HY000]: General error: 1 near "WITHOUT": syntax error, Code: HY000, File: /var/www/vhosts/cineramen.gr/httpdocs/wp-content/plugins/phastpress/sdk/phast.php, Line: 230"
    2023-10-31 17:30:49	WARNING: [pool cineramen.gr] child 26111 said into stderr: "PHP message: 71302925 dom-filters Kibo\Phast\Cache\Sqlite\Manager Caught PDOException during cache operation: SQLSTATE[HY000]: General error: 1 near "WITHOUT": syntax error; retrying operation"
    2023-10-31 17:30:49	WARNING: [pool cineramen.gr] child 26111 said into stderr: "PHP message: 71302925 dom-filters Kibo\Phast\Filters\HTML\Composite\Filter 230 Phast: CompositeHTMLFilter: PDOException Msg: SQLSTATE[HY000]: General error: 1 near "WITHOUT": syntax error, Code: HY000, File: /var/www/vhosts/cineramen.gr/httpdocs/wp-content/plugins/phastpress/sdk/phast.php, Line: 230"
    2023-10-31 17:30:50	WARNING: [pool cineramen.gr] child 28523 said into stderr: "PHP message: 57445162 dom-filters Kibo\Phast\Cache\Sqlite\Manager Caught PDOException during cache operation: SQLSTATE[HY000]: General error: 1 near "WITHOUT": syntax error; retrying operation"
    2023-10-31 17:30:50	WARNING: [pool cineramen.gr] child 28523 said into stderr: "PHP message: 57445162 dom-filters Kibo\Phast\Filters\HTML\Composite\Filter 230 Phast: CompositeHTMLFilter: PDOException Msg: SQLSTATE[HY000]: General error: 1 near "WITHOUT": syntax error, Code: HY000, File: /var/www/vhosts/cineramen.gr/httpdocs/wp-content/plugins/phastpress/sdk/phast.php, Line: 230"
    2023-10-31 17:30:54	WARNING: [pool cineramen.gr] child 28523 said into stderr: "PHP message: 49174713 dom-filters Kibo\Phast\Cache\Sqlite\Manager Caught PDOException during cache operation: SQLSTATE[HY000]: General error: 1 near "WITHOUT": syntax error; retrying operation"
    2023-10-31 17:30:54	WARNING: [pool cineramen.gr] child 28523 said into stderr: "PHP message: 49174713 dom-filters Kibo\Phast\Filters\HTML\Composite\Filter 230 Phast: CompositeHTMLFilter: PDOException Msg: SQLSTATE[HY000]: General error: 1 near "WITHOUT": syntax error, Code: HY000, File: /var/www/vhosts/cineramen.gr/httpdocs/wp-content/plugins/phastpress/sdk/phast.php, Line: 230"
    2023-10-31 17:31:05	WARNING: [pool cineramen.gr] child 26111 said into stderr: "PHP message: 49060044 dom-filters Kibo\Phast\Cache\Sqlite\Manager Caught PDOException during cache operation: SQLSTATE[HY000]: General error: 1 near "WITHOUT": syntax error; retrying operation"
    2023-10-31 17:31:05	WARNING: [pool cineramen.gr] child 26111 said into stderr: "PHP message: 49060044 dom-filters Kibo\Phast\Filters\HTML\Composite\Filter 230 Phast: CompositeHTMLFilter: PDOException Msg: SQLSTATE[HY000]: General error: 1 near "WITHOUT": syntax error, Code: HY000, File: /var/www/vhosts/cineramen.gr/httpdocs/wp-content/plugins/phastpress/sdk/phast.php, Line: 230"
    2023-10-31 17:31:06	WARNING: [pool cineramen.gr] child 28523 said into stderr: "PHP message: 20615739 dom-filters Kibo\Phast\Cache\Sqlite\Manager Caught PDOException during cache operation: SQLSTATE[HY000]: General error: 1 near "WITHOUT": syntax error; retrying operation"
    2023-10-31 17:31:06	WARNING: [pool cineramen.gr] child 28523 said into stderr: "PHP message: 20615739 dom-filters Kibo\Phast\Filters\HTML\Composite\Filter 230 Phast: CompositeHTMLFilter: PDOException Msg: SQLSTATE[HY000]: General error: 1 near "WITHOUT": syntax error, Code: HY000, File: /var/www/vhosts/cineramen.gr/httpdocs/wp-content/plugins/phastpress/sdk/phast.php, Line: 230"
    2023-10-31 17:31:22	WARNING: [pool cineramen.gr] child 28523 said into stderr: "PHP message: 20663177 dom-filters Kibo\Phast\Cache\Sqlite\Manager Caught PDOException during cache operation: SQLSTATE[HY000]: General error: 1 near "WITHOUT": syntax error; retrying operation"
    2023-10-31 17:31:22	WARNING: [pool cineramen.gr] child 28523 said into stderr: "PHP message: 20663177 dom-filters Kibo\Phast\Filters\HTML\Composite\Filter 230 Phast: CompositeHTMLFilter: PDOException Msg: SQLSTATE[HY000]: General error: 1 near "WITHOUT": syntax error, Code: HY000, File: /var/www/vhosts/cineramen.gr/httpdocs/wp-content/plugins/phastpress/sdk/phast.php, Line: 230"
    2023-10-31 17:31:37	WARNING: [pool cineramen.gr] child 32326 said into stderr: "PHP message: 98874109 dom-filters Kibo\Phast\Cache\Sqlite\Manager Caught PDOException during cache operation: SQLSTATE[HY000]: General error: 1 near "WITHOUT": syntax error; retrying operation"
    2023-10-31 17:31:37	WARNING: [pool cineramen.gr] child 32326 said into stderr: "PHP message: 98874109 dom-filters Kibo\Phast\Filters\HTML\Composite\Filter 230 Phast: CompositeHTMLFilter: PDOException Msg: SQLSTATE[HY000]: General error: 1 near "WITHOUT": syntax error, Code: HY000, File: /var/www/vhosts/cineramen.gr/httpdocs/wp-content/plugins/phastpress/sdk/phast.php, Line: 230"
    2023-10-31 17:31:38	WARNING: [pool cineramen.gr] child 32443 said into stderr: "PHP message: 82536826 dom-filters Kibo\Phast\Cache\Sqlite\Manager Caught PDOException during cache operation: SQLSTATE[HY000]: General error: 1 near "WITHOUT": syntax error; retrying operation"
    2023-10-31 17:31:38	WARNING: [pool cineramen.gr] child 32443 said into stderr: "PHP message: 82536826 dom-filters Kibo\Phast\Filters\HTML\Composite\Filter 230 Phast: CompositeHTMLFilter: PDOException Msg: SQLSTATE[HY000]: General error: 1 near "WITHOUT": syntax error, Code: HY000, File: /var/www/vhosts/cineramen.gr/httpdocs/wp-content/plugins/phastpress/sdk/phast.php, Line: 230"
    RANK MATH SYSTEM INFO
    
    
    
    ### rank-math ###
    
    version: 1.0.204
    database_version: 1
    plugin_plan: Free
    active_modules: link-counter, seo-analysis, sitemap, rich-snippet, instant-indexing, role-manager, local-seo, 404-monitor, redirections, image-seo
    refresh_token: Token exists
    permissions: 
    	Search Console: Given
    rank_math_404_logs: 32 KB
    rank_math_redirections: 32 KB
    rank_math_redirections_cache: 32 KB
    rank_math_internal_links: 32 KB
    rank_math_internal_meta: 16 KB
    rank_math_analytics_gsc: 80 KB
    rank_math_analytics_objects: 4 MB
    rank_math_analytics_inspections: Not found
    
    ### wp-core ###
    
    version: 6.3.2
    site_language: el
    user_language: el
    timezone: Europe/Athens
    permalink: /%postname%/
    https_status: true
    multisite: false
    user_registration: false
    blog_public: 1
    default_comment_status: open
    environment_type: production
    user_count: 6
    dotorg_communication: true
    
    ### wp-dropins (2) ###
    
    advanced-cache.php: true
    maintenance.php: true
    
    ### wp-active-theme ###
    
    name: Newspaper (Newspaper)
    version: 12.6.1
    author: tagDiv
    author_website: https://themeforest.net/user/tagDiv/portfolio
    parent_theme: none
    theme_features: core-block-patterns, post-formats, post-thumbnails, automatic-feed-links, html5, woocommerce, bbpress, align-wide, align-full, editor-font-sizes, widgets-block-editor, editor-style, menus, widgets
    theme_path: /var/www/vhosts/cineramen.gr/httpdocs/wp-content/themes/Newspaper
    auto_update: Απενεργοποιμ?νο
    
    ### wp-plugins-active (19) ###
    
    Akismet Anti-spam: Spam Protection: version: 5.3, author: Automattic - Anti-spam Team, Οι αυτ?ματε? ενημερ?σει? απενεργοποι?θηκαν
    AutoConvert Greeklish Permalinks: version: 4.1.2, author: Dimitris Mavroudis, Οι αυτ?ματε? ενημερ?σει? απενεργοποι?θηκαν
    Classic Editor: version: 1.6.3, author: WordPress Contributors, Οι αυτ?ματε? ενημερ?σει? απενεργοποι?θηκαν
    Disable Everything: version: 0.4.1, author: Dessky Team, Οι αυτ?ματε? ενημερ?σει? απενεργοποι?θηκαν
    Envato Market: version: 2.0.10, author: Envato, Οι αυτ?ματε? ενημερ?σει? απενεργοποι?θηκαν
    Force Regenerate Thumbnails: version: 2.1.3, author: Exactly WWW, Οι αυτ?ματε? ενημερ?σει? απενεργοποι?θηκαν
    PhastPress: version: 2.19, author: Albert Peschar, Οι αυτ?ματε? ενημερ?σει? απενεργοποι?θηκαν
    PublishPress Authors: version: 4.2.1, author: PublishPress, Οι αυτ?ματε? ενημερ?σει? απενεργοποι?θηκαν
    Rank Math SEO: version: 1.0.204, author: Rank Math, Οι αυτ?ματε? ενημερ?σει? απενεργοποι?θηκαν
    Really Simple SSL: version: 7.1.3, author: Really Simple Plugins, Οι αυτ?ματε? ενημερ?σει? απενεργοποι?θηκαν
    Shortcodes Finder: version: 1.5.3, author: Scribit, Οι αυτ?ματε? ενημερ?σει? απενεργοποι?θηκαν
    tagDiv Cloud Library: version: 3.0 | built on 05.10.2023 12:50, author: tagDiv, Οι αυτ?ματε? ενημερ?σει? απενεργοποι?θηκαν
    tagDiv Composer: version: 4.4 | built on 05.10.2023 12:50, author: tagDiv, Οι αυτ?ματε? ενημερ?σει? απενεργοποι?θηκαν
    tagDiv Social Counter: version: 5.4 | built on 06.10.2023 12:11, author: tagDiv, Οι αυτ?ματε? ενημερ?σει? απενεργοποι?θηκαν
    Wordfence Security: version: 7.10.5, author: Wordfence, Οι αυτ?ματε? ενημερ?σει? απενεργοποι?θηκαν
    WP-Optimize - Clean, Compress, Cache: version: 3.2.21, author: David Anderson, Ruhani Rabin, Team Updraft, Οι αυτ?ματε? ενημερ?σει? απενεργοποι?θηκαν
    WPForms Lite: version: 1.8.4.1, author: WPForms, Οι αυτ?ματε? ενημερ?σει? απενεργοποι?θηκαν
    WP Super Cache: version: 1.10.0, author: Automattic, Οι αυτ?ματε? ενημερ?σει? απενεργοποι?θηκαν
    Yet Another Stars Rating: version: 3.4.6, author: YetAnotherStarsRating.com, Οι αυτ?ματε? ενημερ?σει? απενεργοποι?θηκαν
    
    ### wp-server ###
    
    server_architecture: Linux 3.10.0-962.3.2.lve1.5.77.el7.x86_64 x86_64
    httpd_software: Apache
    php_version: 8.2.12 64bit
    php_sapi: fpm-fcgi
    max_input_variables: 5120
    time_limit: 120
    memory_limit: 512M
    max_input_time: 120
    upload_max_filesize: 128M
    php_post_max_size: 256M
    curl_version: 7.29.0 NSS/3.53.1
    suhosin: false
    imagick_availability: true
    pretty_permalinks: true
    htaccess_extra_rules: true
    current: 2023-10-31T15:40:39+00:00
    utc-time: Tuesday, 31-Oct-23 15:40:39 UTC
    server-time: 2023-10-31T17:40:38+02:00
    
    ### wp-database ###
    
    extension: mysqli
    server_version: 10.4.30-MariaDB-cll-lve
    client_version: mysqlnd 8.2.12
    max_allowed_packet: 134217728
    max_connections: 1000
    
    ### wp-constants ###
    
    WP_HOME: undefined
    WP_SITEURL: undefined
    WP_CONTENT_DIR: /var/www/vhosts/cineramen.gr/httpdocs/wp-content
    WP_PLUGIN_DIR: /var/www/vhosts/cineramen.gr/httpdocs/wp-content/plugins
    WP_MEMORY_LIMIT: 512M
    WP_MAX_MEMORY_LIMIT: 512M
    WP_DEBUG: false
    WP_DEBUG_DISPLAY: true
    WP_DEBUG_LOG: false
    SCRIPT_DEBUG: false
    WP_CACHE: true
    CONCATENATE_SCRIPTS: true
    COMPRESS_SCRIPTS: undefined
    COMPRESS_CSS: undefined
    WP_ENVIRONMENT_TYPE: Δεν ?χει οριστε?
    WP_DEVELOPMENT_MODE: undefined
    DB_CHARSET: utf8
    DB_COLLATE: undefined
    
    ### wp-filesystem ###
    
    wordpress: writable
    wp-content: writable
    uploads: writable
    plugins: writable
    themes: writable
    
    
    Plugin Support Rank Math Support

    (@rankmathsupport)

    Hello @tehcook,

    The error log you shared doesn’t seem to mention about the issue with the filter code and the functions.php file.

    Can you please try using the Using Code Snippets Plugin instead and see if that would help?

    Looking forward to helping you.

    Thread Starter Aggravated Badger

    (@tehcook)

    Hi and thank you for taking the time to look into my issue, I really appreciate it!

    I tried installing Code Snippet but it ”crashes” the website and then I have to remove the plugin via Plesk’s file manager. It’s weird why this is happening…. :'(

    Plugin Support Rank Math Support

    (@rankmathteam)

    Hello @tehcook,

    It seems to be working fine on our end.

    Assuming you are using the latest version of all the plugins, themes, and WordPress (please update if not yet), it would seem like a conflict with one of the plugins or the theme you are using.

    To determine that, please follow this troubleshooting guide:
    https://rankmath.com/kb/check-plugin-conflicts/

    Only the site admin would know and your users won’t be affected by this troubleshooting.

    You can follow this video tutorial as well:
    https://www.youtube.com/watch?v=FcIWRhcUP2c

    Looking forward to helping you.

    Thread Starter Aggravated Badger

    (@tehcook)

    Okay so I’ve installed code snippet and use the code provided into a snippet, then the website crashed again. From the log files these are the latest errors (apologies in advance for the wall of text that follows)

    2023-11-09 10:08:59	[proxy_fcgi:error] [pid 14190:tid 140234800965376] [client 52.70.240.171:47176] AH01071: Got error 'PHP message: 48236811\tdom-filters\tKibo\\Phast\\Cache\\Sqlite\\Manager\tCaught PDOException during cache operation: SQLSTATE[HY000]: General error: 1 near "WITHOUT": syntax error; retrying operation; PHP message: 48236811\tdom-filters\tKibo\\Phast\\Filters\\HTML\\Composite\\Filter\t230\tPhast: CompositeHTMLFilter: PDOException Msg: SQLSTATE[HY000]: General error: 1 near "WITHOUT": syntax error, Code: HY000, File: /var/www/vhosts/cineramen.gr/httpdocs/wp-content/plugins/phastpress/sdk/phast.php, Line: 230'
    2023-11-09 10:09:01	[proxy_fcgi:error] [pid 14190:tid 140234876499712] [client 62.74.24.243:47464] AH01071: Got error 'PHP message: 52239778\tdom-filters\tKibo\\Phast\\Cache\\Sqlite\\Manager\tCaught PDOException during cache operation: SQLSTATE[HY000]: General error: 1 near "WITHOUT": syntax error; retrying operation; PHP message: 52239778\tdom-filters\tKibo\\Phast\\Filters\\HTML\\Composite\\Filter\t230\tPhast: CompositeHTMLFilter: PDOException Msg: SQLSTATE[HY000]: General error: 1 near "WITHOUT": syntax error, Code: HY000, File: /var/www/vhosts/cineramen.gr/httpdocs/wp-content/plugins/phastpress/sdk/phast.php, Line: 230', referer: https://www.google.com/
    2023-11-09 10:09:01	[proxy_fcgi:error] [pid 14190:tid 140234868107008] [client 2.86.85.149:47456] AH01071: Got error 'PHP message: 57136484\tdom-filters\tKibo\\Phast\\Cache\\Sqlite\\Manager\tCaught PDOException during cache operation: SQLSTATE[HY000]: General error: 1 near "WITHOUT": syntax error; retrying operation; PHP message: 57136484\tdom-filters\tKibo\\Phast\\Filters\\HTML\\Composite\\Filter\t230\tPhast: CompositeHTMLFilter: PDOException Msg: SQLSTATE[HY000]: General error: 1 near "WITHOUT": syntax error, Code: HY000, File: /var/www/vhosts/cineramen.gr/httpdocs/wp-content/plugins/phastpress/sdk/phast.php, Line: 230', referer: https://cineramen.gr/oi-dynates-allages-stin-enimerosi-1-04-1-gia-to-armored-core-6-apo-tin-fromsoftware/
    2023-11-09 10:09:04	[:error] [pid 6299:tid 140234859714304] [client 62.74.24.243:47760] [client 62.74.24.243] ModSecurity: Warning. Pattern match "(?:edit-theme-plugin-file|update|(?:upload|install-(?:plugin|theme)))" at ARGS:action. [file "/etc/httpd/conf/modsecurity.d/rules/comodo_free/002_i360_1_vectors.conf"] [line "77"] [id "77316925"] [msg "IM360 WAF: WordPress theme/plugin activity track||File:||SC:/var/www/vhosts/cineramen.gr/httpdocs/wp-admin/admin-ajax.php||MVN:ARGS:action||Action:td_ajax_update_views||Theme:||Plugin:||User:cineramen||T:APACHE||"] [severity "DEBUG"] [tag "wp_core"] [tag "noshow"] [tag "im360_req_post"] [hostname "cineramen.gr"] [uri "/wp-admin/admin-ajax.php"] [unique_id "ZUyToPRM5E9pLtrJ6P3f1AAAAIk"], referer: https://cineramen.gr/asyllipto-rekor-gia-to-netflix-me-ta-perissotera-epeisodia-poy-echoyn-vgei-pote/
    2023-11-09 10:09:04	[proxy_fcgi:error] [pid 6299:tid 140234834536192] [client 52.70.240.171:47614] AH01071: Got error 'PHP message: 69051433\tdom-filters\tKibo\\Phast\\Cache\\Sqlite\\Manager\tCaught PDOException during cache operation: SQLSTATE[HY000]: General error: 1 near "WITHOUT": syntax error; retrying operation; PHP message: 69051433\tdom-filters\tKibo\\Phast\\Filters\\HTML\\Composite\\Filter\t230\tPhast: CompositeHTMLFilter: PDOException Msg: SQLSTATE[HY000]: General error: 1 near "WITHOUT": syntax error, Code: HY000, File: /var/www/vhosts/cineramen.gr/httpdocs/wp-content/plugins/phastpress/sdk/phast.php, Line: 230'
    2023-11-09 10:09:06	[proxy_fcgi:error] [pid 6334:tid 140234997626624] [client 62.74.24.243:47734] AH01071: Got error 'PHP message: PHP Fatal error: Allowed memory size of 536870912 bytes exhausted (tried to allocate 8192 bytes) in /var/www/vhosts/cineramen.gr/httpdocs/wp-includes/class-wpdb.php on line 2320', referer: https://cineramen.gr/asyllipto-rekor-gia-to-netflix-me-ta-perissotera-epeisodia-poy-echoyn-vgei-pote/
    2023-11-09 10:09:06	[proxy_fcgi:error] [pid 6334:tid 140234997626624] [client 62.74.24.243:47734] AH01071: Got error '; PHP message: PHP Fatal error: Allowed memory size of 536870912 bytes exhausted (tried to allocate 40960 bytes) in /var/www/vhosts/cineramen.gr/httpdocs/wp-includes/functions.php on line 650', referer: https://cineramen.gr/asyllipto-rekor-gia-to-netflix-me-ta-perissotera-epeisodia-poy-echoyn-vgei-pote/
    2023-11-09 10:09:06	[proxy_fcgi:error] [pid 6299:tid 140234859714304] [client 62.74.24.243:47760] AH01071: Got error 'PHP message: PHP Fatal error: Allowed memory size of 536870912 bytes exhausted (tried to allocate 20480 bytes) in /var/www/vhosts/cineramen.gr/httpdocs/wp-includes/class-wpdb.php on line 2320', referer: https://cineramen.gr/asyllipto-rekor-gia-to-netflix-me-ta-perissotera-epeisodia-poy-echoyn-vgei-pote/
    2023-11-09 10:09:06	[proxy_fcgi:error] [pid 6299:tid 140234859714304] [client 62.74.24.243:47760] AH01071: Got error '; PHP message: PHP Fatal error: Allowed memory size of 536870912 bytes exhausted (tried to allocate 40960 bytes) in /var/www/vhosts/cineramen.gr/httpdocs/wp-includes/functions.php on line 650', referer: https://cineramen.gr/asyllipto-rekor-gia-to-netflix-me-ta-perissotera-epeisodia-poy-echoyn-vgei-pote/
    2023-11-09 10:09:09	[proxy_fcgi:error] [pid 14190:tid 140234759001856] [client 23.22.35.162:48188] AH01071: Got error 'PHP message: 55123138\tdom-filters\tKibo\\Phast\\Cache\\Sqlite\\Manager\tCaught PDOException during cache operation: SQLSTATE[HY000]: General error: 1 near "WITHOUT": syntax error; retrying operation; PHP message: 55123138\tdom-filters\tKibo\\Phast\\Filters\\HTML\\Composite\\Filter\t230\tPhast: CompositeHTMLFilter: PDOException Msg: SQLSTATE[HY000]: General error: 1 near "WITHOUT": syntax error, Code: HY000, File: /var/www/vhosts/cineramen.gr/httpdocs/wp-content/plugins/phastpress/sdk/phast.php, Line: 230'
    2023-11-09 10:09:10	[proxy_fcgi:error] [pid 14190:tid 140234800965376] [client 2.86.82.139:48234] AH01071: Got error 'PHP message: 52721898\tdom-filters\tKibo\\Phast\\Cache\\Sqlite\\Manager\tCaught PDOException during cache operation: SQLSTATE[HY000]: General error: 1 near "WITHOUT": syntax error; retrying operation; PHP message: 52721898\tdom-filters\tKibo\\Phast\\Filters\\HTML\\Composite\\Filter\t230\tPhast: CompositeHTMLFilter: PDOException Msg: SQLSTATE[HY000]: General error: 1 near "WITHOUT": syntax error, Code: HY000, File: /var/www/vhosts/cineramen.gr/httpdocs/wp-content/plugins/phastpress/sdk/phast.php, Line: 230', referer: https://cineramen.gr/i-epistrofi-tou-rainer-verner-fasmpinter-i-thryliki-seira-se-apokatestimeni-morfi/
    2023-11-09 10:09:11	[proxy_fcgi:error] [pid 6334:tid 140234691860224] [client 52.70.240.171:48274] AH01071: Got error 'PHP message: 95890661\tdom-filters\tKibo\\Phast\\Cache\\Sqlite\\Manager\tCaught PDOException during cache operation: SQLSTATE[HY000]: General error: 1 near "WITHOUT": syntax error; retrying operation; PHP message: 95890661\tdom-filters\tKibo\\Phast\\Filters\\HTML\\Composite\\Filter\t230\tPhast: CompositeHTMLFilter: PDOException Msg: SQLSTATE[HY000]: General error: 1 near "WITHOUT": syntax error, Code: HY000, File: /var/www/vhosts/cineramen.gr/httpdocs/wp-content/plugins/phastpress/sdk/phast.php, Line: 230'
    2023-11-09 10:09:11	[proxy_fcgi:error] [pid 14190:tid 140234767394560] [client 157.55.39.9:48290] AH01071: Got error 'PHP message: 3477513\tdom-filters\tKibo\\Phast\\Cache\\Sqlite\\Manager\tCaught PDOException during cache operation: SQLSTATE[HY000]: General error: 1 near "WITHOUT": syntax error; retrying operation; PHP message: 3477513\tdom-filters\tKibo\\Phast\\Filters\\HTML\\Composite\\Filter\t230\tPhast: CompositeHTMLFilter: PDOException Msg: SQLSTATE[HY000]: General error: 1 near "WITHOUT": syntax error, Code: HY000, File: /var/www/vhosts/cineramen.gr/httpdocs/wp-content/plugins/phastpress/sdk/phast.php, Line: 230'
    2023-11-09 10:09:11	[proxy_fcgi:error] [pid 14190:tid 140235006019328] [client 2.86.85.149:48328] AH01071: Got error 'PHP message: 32886801\tdom-filters\tKibo\\Phast\\Cache\\Sqlite\\Manager\tCaught PDOException during cache operation: SQLSTATE[HY000]: General error: 1 near "WITHOUT": syntax error; retrying operation; PHP message: 32886801\tdom-filters\tKibo\\Phast\\Filters\\HTML\\Composite\\Filter\t230\tPhast: CompositeHTMLFilter: PDOException Msg: SQLSTATE[HY000]: General error: 1 near "WITHOUT": syntax error, Code: HY000, File: /var/www/vhosts/cineramen.gr/httpdocs/wp-content/plugins/phastpress/sdk/phast.php, Line: 230', referer: https://cineramen.gr/i-epistrofi-tou-rainer-verner-fasmpinter-i-thryliki-seira-se-apokatestimeni-morfi/
    2023-11-09 10:09:13	[proxy_fcgi:error] [pid 14190:tid 140234884892416] [client 2.86.88.36:48394] AH01071: Got error 'PHP message: 2632080\tdom-filters\tKibo\\Phast\\Cache\\Sqlite\\Manager\tCaught PDOException during cache operation: SQLSTATE[HY000]: General error: 1 near "WITHOUT": syntax error; retrying operation; PHP message: 2632080\tdom-filters\tKibo\\Phast\\Filters\\HTML\\Composite\\Filter\t230\tPhast: CompositeHTMLFilter: PDOException Msg: SQLSTATE[HY000]: General error: 1 near "WITHOUT": syntax error, Code: HY000, File: /var/www/vhosts/cineramen.gr/httpdocs/wp-content/plugins/phastpress/sdk/phast.php, Line: 230', referer: https://cineramen.gr/i-epistrofi-tou-rainer-verner-fasmpinter-i-thryliki-seira-se-apokatestimeni-morfi/
    2023-11-09 10:09:13	[proxy_fcgi:error] [pid 14190:tid 140234742216448] [client 52.70.240.171:48438] AH01071: Got error 'PHP message: 35299552\tdom-filters\tKibo\\Phast\\Cache\\Sqlite\\Manager\tCaught PDOException during cache operation: SQLSTATE[HY000]: General error: 1 near "WITHOUT": syntax error; retrying operation; PHP message: 35299552\tdom-filters\tKibo\\Phast\\Filters\\HTML\\Composite\\Filter\t230\tPhast: CompositeHTMLFilter: PDOException Msg: SQLSTATE[HY000]: General error: 1 near "WITHOUT": syntax error, Code: HY000, File: /var/www/vhosts/cineramen.gr/httpdocs/wp-content/plugins/phastpress/sdk/phast.php, Line: 230'
    2023-11-09 10:09:14	[proxy_fcgi:error] [pid 14190:tid 140234708645632] [client 2.86.88.36:48534] AH01071: Got error 'PHP message: 72520907\tdom-filters\tKibo\\Phast\\Cache\\Sqlite\\Manager\tCaught PDOException during cache operation: SQLSTATE[HY000]: General error: 1 near "WITHOUT": syntax error; retrying operation; PHP message: 72520907\tdom-filters\tKibo\\Phast\\Filters\\HTML\\Composite\\Filter\t230\tPhast: CompositeHTMLFilter: PDOException Msg: SQLSTATE[HY000]: General error: 1 near "WITHOUT": syntax error, Code: HY000, File: /var/www/vhosts/cineramen.gr/httpdocs/wp-content/plugins/phastpress/sdk/phast.php, Line: 230', referer: https://cineramen.gr/kopike-i-seira-peta-tin-friteza/
    2023-11-09 10:09:17	[proxy_fcgi:error] [pid 14190:tid 140234683467520] [client 2.86.68.205:48740] AH01071: Got error 'PHP message: 6252666\tdom-filters\tKibo\\Phast\\Cache\\Sqlite\\Manager\tCaught PDOException during cache operation: SQLSTATE[HY000]: General error: 1 near "WITHOUT": syntax error; retrying operation; PHP message: 6252666\tdom-filters\tKibo\\Phast\\Filters\\HTML\\Composite\\Filter\t230\tPhast: CompositeHTMLFilter: PDOException Msg: SQLSTATE[HY000]: General error: 1 near "WITHOUT": syntax error, Code: HY000, File: /var/www/vhosts/cineramen.gr/httpdocs/wp-content/plugins/phastpress/sdk/phast.php, Line: 230', referer: https://cineramen.gr/kopike-i-seira-peta-tin-friteza/
    2023-11-09 10:09:18	[proxy_fcgi:error] [pid 14190:tid 140234842928896] [client 2.86.82.139:48820] AH01071: Got error 'PHP message: 95704295\tdom-filters\tKibo\\Phast\\Cache\\Sqlite\\Manager\tCaught PDOException during cache operation: SQLSTATE[HY000]: General error: 1 near "WITHOUT": syntax error; retrying operation; PHP message: 95704295\tdom-filters\tKibo\\Phast\\Filters\\HTML\\Composite\\Filter\t230\tPhast: CompositeHTMLFilter: PDOException Msg: SQLSTATE[HY000]: General error: 1 near "WITHOUT": syntax error, Code: HY000, File: /var/www/vhosts/cineramen.gr/httpdocs/wp-content/plugins/phastpress/sdk/phast.php, Line: 230', referer: https://cineramen.gr/kopike-i-seira-peta-tin-friteza/
    2023-11-09 10:09:18	[proxy_fcgi:error] [pid 6334:tid 140234842928896] [client 3.224.220.101:48816] AH01071: Got error 'PHP message: 19643680\tdom-filters\tKibo\\Phast\\Cache\\Sqlite\\Manager\tCaught PDOException during cache operation: SQLSTATE[HY000]: General error: 1 near "WITHOUT": syntax error; retrying operation; PHP message: 19643680\tdom-filters\tKibo\\Phast\\Filters\\HTML\\Composite\\Filter\t230\tPhast: CompositeHTMLFilter: PDOException Msg: SQLSTATE[HY000]: General error: 1 near "WITHOUT": syntax error, Code: HY000, File: /var/www/vhosts/cineramen.gr/httpdocs/wp-content/plugins/phastpress/sdk/phast.php, Line: 230'
    2023-11-09 10:09:21	[proxy_fcgi:error] [pid 14190:tid 140234868107008] [client 3.224.220.101:49100] AH01071: Got error 'PHP message: 30800708\tdom-filters\tKibo\\Phast\\Cache\\Sqlite\\Manager\tCaught PDOException during cache operation: SQLSTATE[HY000]: General error: 1 near "WITHOUT": syntax error; retrying operation; PHP message: 30800708\tdom-filters\tKibo\\Phast\\Filters\\HTML\\Composite\\Filter\t230\tPhast: CompositeHTMLFilter: PDOException Msg: SQLSTATE[HY000]: General error: 1 near "WITHOUT": syntax error, Code: HY000, File: /var/www/vhosts/cineramen.gr/httpdocs/wp-content/plugins/phastpress/sdk/phast.php, Line: 230'
    2023-11-09 10:09:22	[proxy_fcgi:error] [pid 6334:tid 140234826143488] [client 2.86.85.149:49092] AH01071: Got error 'PHP message: 3021982\tdom-filters\tKibo\\Phast\\Cache\\Sqlite\\Manager\tCaught PDOException during cache operation: SQLSTATE[HY000]: General error: 1 near "WITHOUT": syntax error; retrying operation; PHP message: 3021982\tdom-filters\tKibo\\Phast\\Filters\\HTML\\Composite\\Filter\t230\tPhast: CompositeHTMLFilter: PDOException Msg: SQLSTATE[HY000]: General error: 1 near "WITHOUT": syntax error, Code: HY000, File: /var/www/vhosts/cineramen.gr/httpdocs/wp-content/plugins/phastpress/sdk/phast.php, Line: 230', referer: https://cineramen.gr/kopike-i-seira-peta-tin-friteza/
    2023-11-09 10:09:23	[proxy_fcgi:error] [pid 14190:tid 140234997626624] [client 2.86.82.139:49184] AH01071: Got error 'PHP message: 4464791\tdom-filters\tKibo\\Phast\\Cache\\Sqlite\\Manager\tCaught PDOException during cache operation: SQLSTATE[HY000]: General error: 1 near "WITHOUT": syntax error; retrying operation; PHP message: 4464791\tdom-filters\tKibo\\Phast\\Filters\\HTML\\Composite\\Filter\t230\tPhast: CompositeHTMLFilter: PDOException Msg: SQLSTATE[HY000]: General error: 1 near "WITHOUT": syntax error, Code: HY000, File: /var/www/vhosts/cineramen.gr/httpdocs/wp-content/plugins/phastpress/sdk/phast.php, Line: 230', referer: https://cineramen.gr/kopike-i-seira-peta-tin-friteza/
    2023-11-09 10:09:26	[proxy_fcgi:error] [pid 14190:tid 140234725431040] [client 2.86.88.36:49272] AH01071: Got error 'PHP message: 32907120\tdom-filters\tKibo\\Phast\\Cache\\Sqlite\\Manager\tCaught PDOException during cache operation: SQLSTATE[HY000]: General error: 1 near "WITHOUT": syntax error; retrying operation; PHP message: 32907120\tdom-filters\tKibo\\Phast\\Filters\\HTML\\Composite\\Filter\t230\tPhast: CompositeHTMLFilter: PDOException Msg: SQLSTATE[HY000]: General error: 1 near "WITHOUT": syntax error, Code: HY000, File: /var/www/vhosts/cineramen.gr/httpdocs/wp-content/plugins/phastpress/sdk/phast.php, Line: 230', referer: https://cineramen.gr/tainies-tromou-pou-vasizontai-se-alithines-istories/
    
    Plugin Support Rank Math Support

    (@rankmathsupport)

    Hello @tehcook,

    It seems like you have a lot of posts on your site, and your server resources are not able to handle adding the focus keyword at once to all the posts. Please use the following filter instead:

    function update_focus_keywords() {
    
    $posts = get_posts(array(
    
    'posts_per_page' => 100,
    
    'offset' => 100,
    
    'post_type' => 'post' // Replace post with the name of your post type
    
    ));
    
    foreach($posts as $p){
    
    // Checks if Rank Math keyword already exists and only updates if it doesn’t have it
    
    $rank_math_keyword = get_post_meta( $p->ID, 'rank_math_focus_keyword', true );
    
    if ( ! $rank_math_keyword ){
    
    update_post_meta($p->ID,'rank_math_focus_keyword',strtolower(get_the_title($p->ID)));
    
    }
    
    }
    
    }
    
    add_action( 'init', 'update_focus_keywords' );


    This code will add the focus keyword for 100 posts at once. Please make sure to increase the offset value by 100 each time you run the code.

    Hope that helps and please do not hesitate to let us know if you need our assistance with anything else.

    Thread Starter Aggravated Badger

    (@tehcook)

    Hi and thanks for providing help, I really appreciate it! Will this code also work for new posts too or is it just for past posts?

    Alternatively, is there a code just for new posts so it doesn’t break the website? We have about 41k posts.

    Cheers

    Plugin Support Rank Math Support

    (@rankmathsupport)

    Hello @tehcook,

    Yes, the code we have shared only applies to your posts without keywords and will skip a post if it already contains keywords.

    You will also notice it under this comment in the code:

    Checks if Rank Math keyword already exists and only updates if it doesn’t have it

    Moreover, once the code processed all your posts, it will apply only to your new posts without keywords.

    Hope that helps.

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Use post title as focus keyword’ is closed to new replies.