Using namespaces and autoloading with Composer in WordPress plugins

Spencer Feng
5 min readJun 17, 2018

Namespace and autoload are not widely adopted when it comes to WordPress plugin development, since WordPress’s commitment to backward compatibility with PHP as old as 5.2.4, whereas, namespace is only available since version 5.3.0. In addition, Composer requires PHP 5.3.2+. However, if you are creating a WordPress website which will be run on a server whose PHP version is…

--

--