If you want to add WordPress Header & Footer in a PHP script flow those stapes:
Step-1: Upload Your PHP project in the WordPress root folder.

Step-2: Added this code on the PHP script header:
<?php require('../wp-blog-header.php'); ?>

Well Done! Now you can use all wp functions in your PHP project, like wp_head(), wp_footer(), get_header(), get_footer(), and more.
Related Posts:
- how to edit open graph meta description programmatically and in which file
- My WP Website Shows HTTP ERROR 500
- Singleton in plugin fails on AJAX call (Plugin initialzed again)
- How save data on user’s client cache
- Theme editing “post thumbnail” help
- add menu page in loop menu order
- Add ID to output only for first option
- How to always display full size image
- Updating Lat and Lng of posts automatically gives sporadic results
- PHP script to redirect traffic based on website accessed
- How to call WordPress PHP file using external js file
- Change username link in admin bar
- How to remove title tag with this filter
- Hide comment notification number and buttons in wp backend
- Embedded pages by ID are not respecting Private and Draft status
- CSS loading as empty file in Custom Theme
- Create html tree sitemap
- Calling WordPress hook from within a class: call to undefined function error
- Update all posts in custom post types with wp_cron()?
- Real time notification on user profile after new comment
- wp_send_json erase last value
- PHP array to jQuery array ” Uncaught SyntaxError: Unexpected token < "
- Adding user meta to post meta wp_insert_post() not working
- PHP – Woocommerce 3.2 Add variable shipping insurance with multiple “else if ” conditions
- I want show only data for today
- wordpress form action page not found
- Add .php to end of all WordPress Pages (multisite)
- Ordering / grouping posts by datepicker ACF
- How to display custom field from a gallery thumbnail?
- Gravity Forms on submit return value on same page
- PHP for loop not working as intended
- How to query a staging database?
- Make customizer panel or section button
- How can i put php code on the wordpress page?
- My search results are only showing 5 posts?
- Why transition_post_type hook is called twice for the same post?
- How to add Open/Close Toggle button into Twenty Fifteen theme for hiding left sidebar?
- WP_query meta_query slow with OR and DATES
- How to use get_template_part always relatively to the file I’m using it in?
- Rewrite SQL query as a prepared statement and use in foreach loop
- WordPress Query Crashes Browser
- How to return count of items found in SQL query
- How to make a parent page for author.php?
- Include search tags and users in my search results system
- Complex PHP for json_encode > how to handle/output right?
- I want url from a file in media using title file
- Creating Log-In Page for backend server
- Get meta_query value by user meta array
- How to do a MySql query in WordPress?
- Can we use corePHP code in wordpress?
- What’s the correct offset value for order ASC?
- how can I disallow special characters, space, capital letter, dot in user name on registration?
- How to use something like meta_query but for fields?
- Can’t get_users info by using json_encode
- How to get all users by user_login as a json_encode array?
- defined (‘ABSPATH’) false after AJAX post to other PHP-file
- WordPress Shortcode based on other shortcode
- Local WordPress from Git repo, where to set document root?
- Creating a custom register form
- Prepared DB Query from _POST array
- can’t grab PHP $_POST variable
- Sort WooCommerce data with WP-CRON?
- Display only upcoming events / Show all events when archive year is selected
- How to add custom text near category/tag title in WordPress Twenty Fifteen Theme?
- Getting error in sql query
- Website is loading with corrupted data once a while [duplicate]
- Customizing WooCommerce with PHP
- Woocommerce variable products are being added to the card on the homepage (ajax)
- user update profile for custom code
- PHP is_embed error showing up
- How fix error in the WordPress loop?
- scroll scrpit to particular button position to next id when click button
- get_users when from meta key that has serialized values
- How to load WP_Editor JS files manually (with AJAX)?
- Check if a user is logged into my WordPress site which is on a different server
- My own theme’s custom widget areas are not working
- Add custom taxonomy to custom search for posts
- PHP Session Variable to WordPress Error
- How to add text before posts
- Displaying 3 Category Posts differently
- Vertical Menu for one page only
- make an array in wordpress cusmization api?
- How can I export data without using any import/export plugin
- Not able to add new item in wordpress home page
- Bootstrap Carousel Indicators Won’t Cycle On Custom WordPress Theme
- Advanced WordPress SQL Query
- Use header option on wp-login page with a second logo
- Display specific main Sub Nav on Woocommerce product pages
- How to have more than one ID included in the exclude command?
- Error when saving wordpress
- How to send logs to plugin owner for a plugin?
- Position a repeated article blocks
- Search for images that width and height is more than 500
- Where to check in PHPmyAdmin / SQL database for subdomain
- Editable Student file associated with basic User ID
- How do I get object if class is instantiated only like this new classname()
- Multisite – Display different header content based on which site is accessed
- How to change query string with pretty URL in WordPress using .htaccess file
- Can the $wbdb function be used in wp w/o also loading the wp_load.php
- Adding action item to admin users table and sending email