Aleksandar Predic
PHP / WordPress Developer, co-founder of Nis WordPress community #WPNis as part of #WPSerbia community
@APredic
Co-founder of Nis WordPress community #WPNis, co-lead organizer of WordCamp Nis #WCNis, #WCEU organizing team.
Who are we talking about here?
Common scenario
Favor one theme and set of plugins for building the sites for it's clients.
If you do a Google Image search for the phrase “don’t hack wordpress core” you can find a few interesting images.
So I guess we should just trust Boromir about not editing WordPress core files :)
The simplest definition is:
WordPress core files are the one's you download via WordPress.org/download website.
You may never need to look into these WordPress core files. However, you will probably need to troubleshoot them at some point, and it will be very useful to have an understanding of what you’re looking at when you’re trying to a debug paticular problem
Name: Marko
Need: Company website
Own office products manufacturing company.
Don't understand how internet works, but knows how to send an email.
He will hire a WP expert to build his website.
Name: Dragoljub AKA Dragce
Skills: Photoshop, HTML, CSS, JS, PHP basics
Role: Self-proclaimed WP expert
Experience: 20 + WordPress projects
Feels that with WordPress plugins he can make any design and functionality happen.
Install newest WP version (at that time 4.7.0), setup the theme, add around 30 plugins, write some CSS. Make few html and PHP changes.
For one task where client requested custom user dashboard on frontend and some admin customization. He had to make some changes to the WordPress core.
Job done.
Dragce is not so proficient in PHP but he often modify some core files so all client requests are meet.
He doesn't have time or knowledge to build a plugin and implement changes the right way.
He tells the client to never hit the update button in WordPress.
After few weeks, Critical zero-day vulnerability in WordPress REST API was discovered that let remote unauthorized hackers modify the content of any post or page within a WordPress site.
Millions of WP sites are in danger, but WP core team issued a patched version and immediate update is required. All the tech and not so tech news are writing about it.
Dragce, as that usually happens in cowboy coding, wasn't using git to track changes made to the core and he can't remember all the changes done.
Marko, reassured and relieved, continues with his daily routines.
After a few days he notices hacked by NG689Skw instead of his regular homepage. He doesn't understand how this could happen. He curses the WordPress as being unsecured CMS.
Dragce answers: Restore a backup of the site before it's been hacked. The update WordPress restriction is still active (don't click WP update button).
Dragce is worried as he can't tell the right date when the site was hacked. Data from that date will have to be entered again...
Marko is in mess not knowing what to do. Also, he will have to pay the developer additional hours for every new fix while the problem won't be solved permanently.
1. It is a threat or attack that exploits a previously unknown vulnerability in a computer application.
The attack occurs on "day zero" when the vulnerability is discovered so developers had zero days to patch it.
2. Attacks that take advantage of a security vulnerability on the same day that the vulnerability becomes publicly known (zero-day).
Security issue is discovered
Update WordPress
Patched version is released
It is very difficult to update to the latest version of WordPress.
If you can’t update because you have modified the core files, then you are opening up the website to these security issues, and you have increased the chance that your website will be hacked
It is a script, mainly PHP, that extend WordPress to include new functions out of the box.
All plugins are located in wp-content/plugins directory
Most of the websites will change or update developers over the years so there is no insurance or guarantee that you will be working on a appropriate website four years from now.
It can be very hard for the developer to realize what changes previous dev made on the core files and it puts the website owner in a bad position because the most of the developers will refuse to work on a hacked version of WordPress CMS.
Automatically opting into these updates means they are applied to your site or network as soon as they’re released, which is especially important in terms of security.
The WordPress core development team does a great job of patching up security holes, but if you don’t update your site, your site isn’t protected.
Every update contains
Most successful WordPress hack attacks are typically the result of human error, be it a configuration error or failing to maintain WordPress, such as keeping core and all plugins up to date, or installing insecure plugins etc.
Biggest source of vulnerabilities in WordPress
Keeping everything up-to-date is key. There are no serious known vulnerabilities in the current version of WordPress core.
There are however, a large number of known vulnerabilities in older WordPress versions.
Keeping WordPress core up-to-date is very important.
Lead developers, core developers, and guest committers, all work together to maintain the WordPress core.
Because WordPress is fully open source, anyone is free to contribute documentation and code to the codebase. However, commit access on the core is limited, and any new contributions go through a code review process.
If your WordPress developer ever told you don't ever hit the update button in WordPress, than something isn't done WordPress friendly way.
By Aleksandar Predic
PHP / WordPress Developer, co-founder of Nis WordPress community #WPNis as part of #WPSerbia community