Why am I getting an error when requiring a file in my plugin?
As the names suggest, plugin_dir_path() will get the filesystem path, while plugin_dir_url gets the URL. A file path looks something like this /var/www/html/wp-content/plugins/my-plugin/ and can be used by PHP to find a file on the server. A URL will look like https://www.example.com/wp-contents/plugins/my-plugin/ and is intended to be accessed over the web. If you attempt to … Read more