-
SEO rank math on my website is giving me the following error:
please check. Thanks!
-
Hello,
We apologize for the issue you are facing with the PHP warning related to
preg_match_all()
. This error typically indicates that there may be a problem with the regular expressions being used or that the PHP version on your server might not be compatible with Rank Math.To resolve this issue, we recommend checking the following:
- PHP Version: Ensure that your server is running a supported version of PHP. Rank Math requires a stable and secure version of PHP to function correctly. You can find more information on upgrading your PHP version here.
- Regular Expressions: If you are using any custom regex patterns in your settings, double-check them for correctness. Incorrect patterns can lead to warnings or errors.
If the issue persists after checking these points, please reply to this ticket, and a human agent from the Rank Math Support team will assist you further. Thank you for raising this concern!
We are using PHP version 8.3, can you fix it to be compatible with this version?
Hello,
Thank you for contacting us. We apologize for any inconvenience this issue may have caused.
That error refers to a mismatch in the parentheses of some of your focus keywords.
Sometimes, you might use parentheses to group words together or to indicate a variation – however, if you forget to close a parenthesis, or if you have an extra one, this can cause the error message to appear.
To fix this problem, you need to check the focus keyword of the posts/pages and make sure that every parenthesis is matched with a closing one.
If the issue persists, we can check the issue on your website for you. Please edit the first post on this ticket and include your WordPress & FTP logins in the designated Sensitive Data section.
Please do take a complete backup of your website before sharing the information with us.
It is completely secure and only our support staff has access to that section. If you want, you can use the below plugin to generate a temporary login URL to your website and share that with us instead:
https://wordpress.org/plugins/temporary-login-without-password/
You can use the above plugin in conjunction with the WP Security Audit Log to monitor what changes our staff might make on your website (if any):
https://wordpress.org/plugins/wp-security-audit-log/
We really look forward to helping you.
Hello,
I have updated the sensitive data as requested. Can you please check further?
Thank you.
Hello,
We can’t seem to replicate the issue on your website. We visited some of your posts but we couldn’t see the same error message.
The error is most likely caused by a mismatch in the parentheses of some of your focus keywords.
Sometimes, you might use parentheses to group words together or to indicate a variation – however, if you forget to close a parenthesis, or if you have an extra one, this can cause the error message to appear.
To fix this problem, you need to check the focus keyword or the SEO meta fields of the page and make sure that every parenthesis is matched with a closing one.
If you know the affected page. Please share the URL here and we’ll fix the issue ourselves.
Looking forward to helping you.
The Update SEO Scores feature only runs until 200 and then stops. Please check.
Hello,
You have a lot of focus keywords which include characters not suitable for focus keywords. For example, there are brackets
[]
added to some keywords which causes issues with the parsing of the content.This would only happen if you have automated the focus keywords so you will need to make changes to the code you are using to automate the focus keywords to exclude characters like parenthesis, curly, and straight brackets from the focus keywords.
Don’t hesitate to get in touch if you have any other questions.
I am using the following code:
function auto_set_focus_keyword_rankmath( $post_id ) {
// Kiểm tra xem có đang chỉnh sửa bài viết không
if ( get_post_type( $post_id ) !== ‘post’ ) {
return;
}//
$post_title = get_the_title( $post_id );//
if ( ! empty( $post_title ) ) {
update_post_meta( $post_id, ‘rank_math_focus_keyword’, $post_title );
}
}
add_action( ‘save_post’, ‘auto_set_focus_keyword_rankmath’ );How should I edit it?
Hello,
Providing custom code snippets is outside the scope of our support, especially with the amount of changes that would be required for that code snippet to work properly and remove the characters we mentioned.
If you don’t feel confident making PHP code modifications, you will need to hire a developer that can implement that for you.
Thank you.
I followed the instructions here: https://rankmath.com/kb/how-to-automate-the-insertion-of-focus-keyword/
Please check
Hello,
We tested the custom
save_post
action function you created, and it works well.Don’t hesitate to get in touch with us if you have any other questions.
I would like to ask more if the plugin https://wordpress.org/plugins/fast-indexing-api/ is suitable for my website?
Hello,
The Fast Indexing API plugin can work on any website, but Google officially recommends it only for JobPosting or BroadcastEvent in VideoObject sites, so this should be suitable for the type of site you have.
While our tests showed great results, we advise caution, especially for money websites.
Hope that helps.
Hello,
Since we did not hear back from you for 15 days, we are assuming that you found the solution. We are closing this support ticket.
If you still need assistance or any other help, please feel free to open a new support ticket, and we will be more than happy to assist.
Thank you.
The ticket ‘PHP message: PHP Warning: preg_match_all():’ is closed to new replies.