If the version of the PHP installed on your hosting server is too low, you can change it. The low version can still work for WordPress, but some low versions have reached the official end of life and as such may expose your site to security vulnerabilities. If you are hosting with HostGator, please follow the steps below to change the PHP version.
Step 1: Login your hosting account (e.g., Hostgator Hosting);
Step 2: Click "Hosting" tab, then click "Hosting Dashboard";
Step 3: Move down and click "MySQL Manage Databases";
Step 4: In the new window, click "Websites" from the left navigation;
Step 5: Move down to "Software" section, and click "PHP Selector";
Step 6: Select the PHP version from the list, and click "Update" to save the selection.