• The REST API is one way that WordPress and other applications communicate with the server. For example, the block editor screen relies on the REST API to display and save your posts and pages.

    When testing the REST API, an error was encountered:

    REST API Endpoint: https://careerpathway.co.in/index.php?rest_route=%2Fwp%2Fv2%2Ftypes%2Fpost&context=edit
    REST API Response: (http_request_failed) cURL error 6: Could not resolve host: careerpathway.co.in

    i am getting above error. no active plugs in in my website all are deletd

    can any one suggest solution for this problem

    ` wp-core
    
    version: 6.4.2
    site_language: en_US
    user_language: en_US
    timezone: +00:00
    permalink: undefined
    https_status: true
    multisite: false
    user_registration: 0
    blog_public: 1
    default_comment_status: open
    environment_type: production
    user_count: 1
    dotorg_communication: true wp-paths-sizes wordpress_path: /home/careerpathway/public_html
    wordpress_size: 54.02 MB (56648919 bytes)
    uploads_path: /home/careerpathway/public_html/wp-content/uploads
    uploads_size: 0.00 B (0 bytes)
    themes_path: /home/careerpathway/public_html/wp-content/themes
    themes_size: 12.06 MB (12644846 bytes)
    plugins_path: /home/careerpathway/public_html/wp-content/plugins
    plugins_size: 2.48 MB (2604797 bytes)
    database_size: 2.83 MB (2965504 bytes)
    total_size: 71.40 MB (74864066 bytes) wp-active-theme name: Twenty Twenty-Three (twentytwentythree)
    version: 1.3
    author: the WordPress team
    author_website: https://www.ads-software.com
    parent_theme: none
    theme_features: core-block-patterns, post-thumbnails, responsive-embeds, editor-styles, html5, automatic-feed-links, widgets-block-editor, block-templates
    theme_path: /home/careerpathway/public_html/wp-content/themes/twentytwentythree
    auto_update: Disabled wp-themes-inactive (2) Twenty Twenty-Four: version: 1.0, author: the WordPress team, Auto-updates disabled
    Twenty Twenty-Two: version: 1.6, author: the WordPress team, Auto-updates disabled wp-plugins-active (1) Advanced Ads: version: 1.48.1, author: Advanced Ads GmbH, Auto-updates disabled wp-media image_editor: WP_Image_Editor_GD
    imagick_module_version: Not available
    imagemagick_version: Not available
    imagick_version: Not available
    file_uploads: 1
    post_max_size: 256M
    upload_max_filesize: 2M
    max_effective_size: 2 MB
    max_file_uploads: 20
    gd_version: bundled (2.1.0 compatible)
    gd_formats: GIF, JPEG, PNG, WebP, BMP, XPM
    ghostscript_version: 9.25 wp-server server_architecture: Linux 4.18.0-372.32.1.lve.el7h.x86_64 x86_64
    httpd_software: LiteSpeed
    php_version: 7.4.33 64bit
    php_sapi: litespeed
    max_input_variables: 1000
    time_limit: 30
    memory_limit: 256M
    max_input_time: 60
    upload_max_filesize: 2M
    php_post_max_size: 256M
    curl_version: 7.86.0 OpenSSL/1.1.1s
    suhosin: false
    imagick_availability: false
    pretty_permalinks: true
    htaccess_extra_rules: true
    current: 2023-12-26T09:42:50+00:00
    utc-time: Tuesday, 26-Dec-23 09:42:50 UTC
    server-time: 2023-12-26T09:42:40+00:00 wp-database extension: mysqli
    server_version: 5.7.40-log-cll-lve
    client_version: mysqlnd 7.4.33
    max_allowed_packet: 268435456
    max_connections: 500 wp-constants WP_HOME: undefined
    WP_SITEURL: undefined
    WP_CONTENT_DIR: /home/careerpathway/public_html/wp-content
    WP_PLUGIN_DIR: /home/careerpathway/public_html/wp-content/plugins
    WP_MEMORY_LIMIT: 40M
    WP_MAX_MEMORY_LIMIT: 256M
    WP_DEBUG: false
    WP_DEBUG_DISPLAY: true
    WP_DEBUG_LOG: false
    SCRIPT_DEBUG: false
    WP_CACHE: false
    CONCATENATE_SCRIPTS: undefined
    COMPRESS_SCRIPTS: undefined
    COMPRESS_CSS: undefined
    WP_ENVIRONMENT_TYPE: Undefined
    WP_DEVELOPMENT_MODE: undefined
    DB_CHARSET: utf8
    DB_COLLATE: undefined wp-filesystem wordpress: writable
    wp-content: writable
    uploads: writable
    plugins: writable
    themes: writable
Viewing 2 replies - 1 through 2 (of 2 total)
  • The message “could not resolve host” says that the system on which you are executing curl to call the REST API cannot resolve the domain you have specified to an IP. You would need to check the network settings of the system on which you are running curl. The message has nothing to do with the WordPress you are trying to reach.

    Moderator bcworkz

    (@bcworkz)

    It looks like your domain name’s DNS records were recently changed. At this time the change has not yet fully propagated to all DNS servers. This usually only takes a few hours but could take as long as 48 hours. You can check current status here:
    https://www.whatsmydns.net/#A/careerpathway.co.in

    Try your code again once the domain name has fully propagated.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘REST API encountred error’ is closed to new replies.