WordPress has a file with the same name at wp-admin/includes/dashboard.php
. Since you are using require_once
PHP will not load a file if it already has been loaded.
The fact that your setup works locally, but not on your remote server, suggests that is has something to do with PHP server set-up. Locally require_once
recognizes the different paths to the two files, your web server does not. So, I would try explicitly including your plugin’s directory in the call. Like this:
require_once (plugin_dir_path( __FILE__ ) . 'includes/dashboard.php');
Related Posts:
- Where to store PHP files created by plugin / themes
- Add screen options to custom admin pages
- Change default admin page for specific role(s)
- Dashboard like meta boxes in my plugin – how to save their position and open/closed state?
- $wp_filesystem returns NULL. What are the dependencies?
- Rearranging Dashboard meta boxes with use of plugin/functions.php
- How to create a Tools menu on the Network Admin dashboard from a plugin
- Files automatically added
- how do you prevent showing a particular category on the admin dashboard for specific user roles?
- Plugin writing: access file that was just uploaded
- Example Dashboard Widget, Cancel not working
- How to implement filesystem cache in WordPress
- Dashboard – get status and position of metaboxes and pass them to ajax method
- Avoid updating post when sending POST or GET request to post.php
- Look for a file in a theme before loading from plugin
- Cleaning a filename after image sideloading a url that contains `%20`
- Custom Icon for Plugin
- How to show the posts listing on dashboard or custom page in admin panel?
- Quick Draft widget (dashboard.php) using custom post_type
- Publish, Save Draft and Preview buttons do not work after being moved with jQuery
- Displaying $_FILES data (simlar to $_POST)
- Tracing dashboard publish settings from input form in WordPress
- Create wordpress dashboard metabox which spans all columns
- How can I add a custom button to the post editor?
- Do Not Back Up? Is there any accepted way to tell backup and clone plugins to skip a certain file? [closed]
- How do I display and edit other posts within the ‘Edit Post’ area of Wp-Admin Dashboard
- Is it possible to add Custom Dashboard Widgets to Custom Admin Menu Page?
- What is the difference between $post_id and get_the_ID()?
- Where to store plugin settings fields
- How can I add columns to the post edit listing to show my custom post data?
- What’s the best method for emptying an option created with the Settings API?
- template_include (overriding default plugin templates via current theme)
- Custom frontend page for plugin without a ‘physical’ page?
- What is nonce and how to use it with Ajax in WordPress? [duplicate]
- Update exisiting site to 3.5 release candidate
- Why does do_action pass a blank string as the first parameter if no $arg is set?
- add_filter and remove_filter added before and after wp_query
- Post added via wp_insert_post with category doesn’t show in category listing
- How to add more than 1 user role to sub-menu pages
- How to get shortcode to work inside a foreach loop called within a shortcode?
- How can I hook into existing WordPress Bulk actions?
- How to bundle a plugin with a theme, or vice versa
- WordPress Media mime type filter problem 4.0
- creating elements/innerblocks via rangecontrol
- How do I determine if a category exists by ID?
- Use theme constants in plugin?
- How to avoid creating first submenu page that is same as menu page?
- How can I display an error message after post has been saved?
- What method to use to call a REST API?
- GET parameters interfere with my plugin settings
- What’s the best place to hire a freelance (contract) WordPress developer? [closed]
- Why my database table not created on activation?
- How to use relative path with my plugins folders?
- Resizing Images for a Gallery-Plugin?
- Which themes do you use to test compatibilities with your plugin [closed]
- Adding functions to hooks from within a class
- What filters to call to modify the output of the entire page?
- How to Create a Simple Related Posts Plugin
- Help With Rewrite_Rules For a Custom Plug-In
- Theme Install using a Custom Repository
- Filtering SelectControl items according the input from another SelectControl in Gutenberg Block (ES5, no JSX)
- As a plugin developer, how do I remove a plugin from the global plugin directory? [duplicate]
- Creating custom input fields on the admin side
- How do I access the menus produced by Dashboard > Appearance > Menus
- Determining URIs for plugin pages
- Filter Categories widget to allow custom sorting?
- How leave selected checkboxes marked after they are selected and saved in the database
- Custom Rest Endpoint: Post/Put/Patch not working
- How to allow only two (or more) users access to a plugin
- Custom avatars in wordpress comments?
- Admin Subpages without Menu entry
- Plugin Development – Get Admin Url (Including cases where wp-admin is not used)
- Any way to update_post_meta with html content? It gets stripped and becomes empty
- How to get the number of pages when paginating comments?
- Add code to template dynamically
- How Can I Add Code To A Preexisting Function Without Editing it
- can members have multiple registration using the same password?
- WordPress (pagenow link) in ajaxurl change after i change plugin language
- Creating posts with links from a txt file
- Get API auth_token token to renew weekly
- escape html in jQuery for WordPress
- Detect if requested page is PWA on server side
- Redirection from a specific page for users logged in but not with membership
- how to add security questions on wp-registration page and validate it
- Can’t get wpColorPicker to work in a widget
- Allow user to add the php code in wp_mail()
- Hiding WordPress REST endpoints from public viewing using Basic Authentication
- Plugin setting page – update_option problem
- WordPress Plugin Update Process
- Rewriting URLs with a query string
- Registration form Plugin… Email confirmation
- Forcing ALL plugin Admin menus into a separate menu
- How to display posts list on my plugin page?
- Can’t add images in wordpress to my page – button isn’t clickable
- WordPress pre-build slider
- Gutenberg and custom blocks messed up pagespeed score. What did I wrong?
- Gutenberg text field validation
- Call API on post save/update and show the result in admin area
- Is there any other ways to replicating changes on live from staging without pushing from git
- upload image to wordpress media library failed for custom post type