What is the process when starting WordPress project from scratch, from choosing theme, plugins, libraries, project organization, GIT workflow. If you follow some basic rules, your WordPress based development time will be far more less, and you will enjoy it.
BEGIN TO INFINITE
PITCH - Project idea and goal
UX - Sitemap and Mockups/Wireframes
UI - Design and client approval
Development - Frontend, backend
Testing - Tester, client and audience feedback
More development - fixing bugs, changing requests, more all of
things upper of this
Deployment - putting it live
Project care - solving bugs, new requests, administration
Pros: free, easy
Cons: no support, lack of
updates are not regular
Pros: support, new
reviewed by professional
developer or company
Cons: custom functions
not always on time,
needs time for dev
learning, too much code
Pros: write what you
need, less code using,
more adaptive, faster
Cons: usually little time
invested in review, some
things written from
Advanced Custom Fields
W3 Total Cache
Local development environment: try Vagrant! You are assured that all
other developers in team will have the same development environment.
Staging environment: recommended to be on same hardware server
resources as production, but of course different codebase, so client can
see if there are any differences in speed.
Production environment: choose managed WordPress instances by
hosting companies, only if you are sured that they are good and you will
not need anything beyond that. If you it is on new VPS or dedicated server,
ask professional system administrator to set it up for you.
WordPress instance init
- Installation is a breeze, either on non or virtual machine
- Change the default wp_ tables slug. It’s never too early for security, also on
staging/production enforce firewall if available on non-shared hosting, to
protect from DDOS attacks.
- HTTP password protection for staging site. You will avoid duplicate
content and bad SEO from web crawlers, or use option in WordPress to
disable indexing for staging
- Protect wp-admin area, either by HTTP protection or rewrite
Development Staging Production
Development Staging Production
Keep only theme and custom plugin on GIT/SVN, there is no need for
anything else there!
- Before you start from scratch, check out some boilerplates, Underscores starter
theme is great! :)
- Theme should be used only for reading and visualization of content, for
creating/updating/deleting data use plugin
- Only use what you need in theme. It’s much easier adding functionalities you need,
than cleaning those you don’t
- JS/CSS/ assets file versions for both development and production, just define it in
- Code with define(‘WP_DEBUG’, true); , it will let you know your mistakes early, and
make you better developer
- Theme options class, it’s easy and if you don’t have it I will share one with you :)
- Before thinking about creating custom plugin, search for almost 53000 of existing
ones, to see if there is some that match your needs
- If you can’t find one, but there is one that with slight modifications will suit your
needs, fork it and modify it either in files or by extending it through hooks
- If needed written from scratch, look first at some boilerplates like
- Look at some other popular plugins for best practices
- Stick closely to WordPress codex as possible
Custom JS/CSS files should be always
minified on production. Have separate
versions for development and production.
Also use concatenation for vendor JS
libraries to build minified versions into one.
Static images should be
compressed. You can use
tools like Google PageSpeed
insights for checking it. You
can also download optimized
versions of images/JS/CSS.
Always load JS/CSS assets
- Prepare your server, or if you are not sure how, go with managed one.
For sites that may handle bigger traffic, you may consider VPS or
dedicated server handled by professional sys. admins
- Install fresh copy of WordPress on new server
- Setup version control and pull your theme and custom plugin, if needed.
If you don’t have version control, upload them manually
- Transfer your eventual files that you have in your upload directory
- Migrate your development database to production, and make changes
regarding site_url and other paths in database
Or use some of those
Duplicator WP Migrate DB All-in-One WP
After launch - backup and maintenance
BACKUP!!! BACKUP!!! BACKUP!!!
- “Keep it updated” - one of the best advices given to me about WordPress, so
please do :)
- Keep plugins also updated
- Make sure that your server hardware is scalable according to your web visits and
- Track logs for errors, DDOS attack patterns, brute force and etc.
- Change WordPress and other passwords regularly
- Optimize your database for better performance
- Keep track of non working links - 404 pages
- Regenerate image sizes over time if new sizes are added