Title: create_function Deprecated Problem
Last modified: December 15, 2021

---

# create_function Deprecated Problem

 *  [therockoid](https://wordpress.org/support/users/therockoid/)
 * (@therockoid)
 * [4 years, 5 months ago](https://wordpress.org/support/topic/create_function-deprecated-problem/)
 * We are using the Headway theme on one of our sites, but it is no longer supported,
   and, frankly, we don’t have a convenient way of adapting right now to a new theme.
 * So I am getting this error with one of our sites:
 * eprecated: Function create_function() is deprecated in /var/www/vhosts/ourstrangeplanet.
   com/public_html/wp-content/themes/headway/library/api/api-admin-meta-box.php 
   on line 29
 * Can someone help me fix?
 * Peace,
    Gene
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fcreate_function-deprecated-problem%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 8 replies - 1 through 8 (of 8 total)

 *  [catacaustic](https://wordpress.org/support/users/catacaustic/)
 * (@catacaustic)
 * [4 years, 5 months ago](https://wordpress.org/support/topic/create_function-deprecated-problem/#post-15168160)
 * You can’t fix this error as that’s coming from one of the theems template files.
   The authors of your theme need to fix it and release a new version. Please contact
   them to report this, and ask for their assistance.
 *  Thread Starter [therockoid](https://wordpress.org/support/users/therockoid/)
 * (@therockoid)
 * [4 years, 5 months ago](https://wordpress.org/support/topic/create_function-deprecated-problem/#post-15168163)
 * I think you missed the first paragraph.
 * The theme is no longer being updated, hasn’t in several years. I suspect the 
   company is out of business and there’s nobody to contact.
 * That is no reason not to fix a template file so it can continue to work with 
   newer PHP versions, especially if it’s not a difficult fix.
 * Peace,
    Gene
 *  [catacaustic](https://wordpress.org/support/users/catacaustic/)
 * (@catacaustic)
 * [4 years, 5 months ago](https://wordpress.org/support/topic/create_function-deprecated-problem/#post-15168171)
 * I didn’t miss it. 🙂
 * If you know how to, or can find someone that knows how to, program in PHP, they
   will be able to fix this by updating the code. Without that knowlege it won’t
   get changed.
 * As it’s a custom child theme that’s been built on the top of the Headway theme,
   which is commercial, no one here will ahve access to the code to know what it
   does and how it works.
 * As it’s a child theme, you have the option of going to the authors of the parent
   theme (Headway) and purchasing the theme from them, so it will have updated and
   support.
 *  Thread Starter [therockoid](https://wordpress.org/support/users/therockoid/)
 * (@therockoid)
 * [4 years, 5 months ago](https://wordpress.org/support/topic/create_function-deprecated-problem/#post-15168179)
 * Obviously I posted the error here hoping someone who knows PHP can provide a 
   fix for me.
 * Third time: The company that made Headway is evidently out of business, so I 
   wouldn’t know whom to contact about this. The support links in my clients WP 
   Dashboard no longer work. That’s why I posted this query here, but clearly you
   aren’t able to help, so hopefully someone will.
 * Peace,
    Gene
 *  [catacaustic](https://wordpress.org/support/users/catacaustic/)
 * (@catacaustic)
 * [4 years, 5 months ago](https://wordpress.org/support/topic/create_function-deprecated-problem/#post-15168189)
 * [https://headwaythemes.com/](https://headwaythemes.com/)
 * They are still around. Note that’s not the company/person that built your sites
   theme. This is the comapny that supplies the parent theme that your sites child
   theme was built on top of. They won’t be able to help for your child theme but
   they are the ones that supply the parent theme for it, which is where the error
   that you’re seeing is coming from.
 * If youwoudl prefer to hire someone to fix it, please post a job on your preferred
   platform. Job offers are not permitted here.
 * As I’ve also said before, no one can help you from what you’ve said as there 
   is not enough information, no code examples and nothing that anyone can debug.
   Without full access to that code, there’s no way that anyone woudl be able to
   fix it.
 *  Thread Starter [therockoid](https://wordpress.org/support/users/therockoid/)
 * (@therockoid)
 * [4 years, 5 months ago](https://wordpress.org/support/topic/create_function-deprecated-problem/#post-15168196)
 * The site works, but the last entry is in 2016, and there’s no way to contact 
   anyone.
 * If you know of a way to contact the individuals involved, thanks.
 * Still I would hope that the error is sufficient for someone to figure out.
 * No, we have no budget for something that we hoped would be an easy fix.
 * Please do not respond any further. I’d like to hear from other people.
 * Peace,
    Gene
 *  [Dion](https://wordpress.org/support/users/diondesigns/)
 * (@diondesigns)
 * [4 years, 5 months ago](https://wordpress.org/support/topic/create_function-deprecated-problem/#post-15170516)
 * OK, here’s another person. You have two choices, with (2) being the **_much_**
   better choice:
 * 1) Edit your wp-config.php file and change `define('WP_DEBUG', true);` to `define('
   WP_DEBUG', false);`. This is the “what I don’t know won’t hurt me” solution, 
   and it will “work” as long as you never update PHP beyond the 7.4 branch. I put“
   work” in quotes because `create_function()` has security issues…which is why 
   it was deprecated in PHP 7.2 and removed in PHP 8.0.
 * 2) Hire someone to convert all uses of `create_function()` to closures. This 
   can’t be done online here because it requires looking at the code to determine
   how to properly do the conversion(s).
 *  Thread Starter [therockoid](https://wordpress.org/support/users/therockoid/)
 * (@therockoid)
 * [4 years, 5 months ago](https://wordpress.org/support/topic/create_function-deprecated-problem/#post-15170596)
 * It would be nice if we had the budget.
 * So far there are at least half a dozen uses of this code in the files I examined,
   but I only did about three quarters of them.
 * Peace,
    Gene

Viewing 8 replies - 1 through 8 (of 8 total)

The topic ‘create_function Deprecated Problem’ is closed to new replies.

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 8 replies
 * 3 participants
 * Last reply from: [therockoid](https://wordpress.org/support/users/therockoid/)
 * Last activity: [4 years, 5 months ago](https://wordpress.org/support/topic/create_function-deprecated-problem/#post-15170596)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
