• Dear Sir,

    My theme has been abandoned by its developers, and I could not give it up or change it to a different theme because I have done lots of customisations on it over the last 3 years. No other theme can match it nor I can transfer data from my theme to another easily. My theme works greatly as intended with those customisations.

    However, it is getting a bit older every day because my theme uses PHP version 7.4, and the current version of PHP is 8.xx on Centos 7 or Direct Admin I use. This means every time I install a new VPS server, I need to downgrade that PHP version, and not sure if that version 7.4 will be available in the next 10 or 20 years on Linux Centos 7 or newer Centos. If I dont downgrade it, there are critical WP errors and my theme wont work at all.

    In this case I cannot even upgrade WP on my website to the latest version of WP.

    Is it possible to upgrade PHP version on my theme so that it can work on the current version of PHP available on Linux system as well as I can upgrade to the latest version of WP?

    Any advice will be very appreciated.

    Many thanks

Viewing 7 replies - 1 through 7 (of 7 total)
  • It is not possible to run individual components of WordPress with their own PHP version, if I understand your question correctly. There are actually only 3 options for your case:

    a) You find someone to customise the theme for current PHP versions. You can find someone like this here, for example: https://jobs.wordpress.net
    b) You change the theme. A fresh cell cure is sometimes refreshing.
    c) You leave it as it is and take security risks with the PHP version you are using.

    You need to make changes to the theme code to make it work with PHP 8.

    You should set up a development environment, clone your website there, and then upgrade PHP version. You can then enable debugging mode to capture all the errors, and work on fixing those.

    BTW, CentOS 7 will reach end of life (EOL) on June 30, 2024 (source). Time to switch? ??

    Thread Starter daro2013

    (@daro2013)

    I think I have two options:

    1. Try to upgrade PHP version myself on a dev site with WP debug on
    2. Keep it as it is without upgrading to latest WP

    This is not really about WP. WP has been compatible with PHP 7.4 for a very long time and will probably continue to be for some time, even if its use can pose a potential risk. Your problem is the theme you are using. I have mentioned the 3 possibilities above.

    Using a test system for a revision of the theme for PHP 8 would be useful in any case.

    Thread Starter daro2013

    (@daro2013)

    The issue is if I upgrade to the latest WP, I may update other plugins too. In this case, some latest plugins no longer work on PHP 7.4

    It is better not to update both WP and plugins.

    Cheers

    Thread Starter daro2013

    (@daro2013)

    Hi @threadi

    Your second option (b) wont suit my needs though.

    Unfortunately, you haven’t mentioned any plugin problems so far. Now that I see the big picture, I would recommend that you set up a test system and carry out the updates on it. Make a note of what you do and in what order so that you can recreate this later in the live system. You should remove plugins for which there are no updates and which do not run with PHP 8 and, if necessary, look for suitable replacements. You will probably still have to adjust the theme manually so that everything works on PHP 8. WordPress itself is (currently) executable up to PHP 8.2.

    As mentioned above, you can also ask a professional to help you with this personally.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Critical WP errors due to wrong version of PHP’ is closed to new replies.