WordPress.org

Ready to get started?Download WordPress

Forums

Missing slashes with some functions on one server (2 posts)

  1. jfacemyer
    Member
    Posted 1 year ago #

    I'm moving a WP installation to a new VPS from a shared host.

    On the new VPS, I'm having trouble with some plugins (two at least) which use functions to get base urls, e.g. admin_url() and plugins_url().

    These functions refuse to add a slash at the end of their output.

    For example, after upgrading Advanced Custom Fields, the "Upgrade Database" button url is: https://www.domain.com/wp-adminedit.php?post_type=acf&page=acf-upgrade, whereas it should obviously be "wp-admin/edit..."

    These plugins and functions work fine in various other installations on various other servers (at least three shared hosting servers I use them on.)

    I've also tried these functions in my functions.php file to see what they do there, and it's the same problem. If I pass an appendage to the function, then the slash is left off at the end of the appendage. For example:

    plugins_url('myplugin')

    gives me "http://www.domain.com/wp-content/plugins/myplugin". But in the case of these plugins, there's content added after "myplugin", but no slash is appended, causing failure for css or other links.

    I assume it's something to do with my php setup...? I've followed the instructions for Linode WP installation as perfectly as I can.

    What am I missing?

  2. jfacemyer
    Member
    Posted 1 year ago #

    Update: this problem only appears when I use the plugin "WordPress HTTPS". When it's on, this problem occurs; otherwise it doesn't. However, it still only occurs on this particular server.

    Obviously something is causing the url to not be returned with an ending slash from those functions. What could be the problem? Can I change something in my server settings to fix it?

Topic Closed

This topic has been closed to new replies.

About this Topic