Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Aleksandar Andrijevic - Handling WordPress proj...

Aleksandar Andrijevic - Handling WordPress projects - begin to infinite

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.

WordPress Greek Community

December 09, 2017
Tweet

More Decks by WordPress Greek Community

Other Decks in Technology

Transcript

  1. #WCAth2017 Project workflow 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
  2. Choosing theme #WCAth2017 Pros: free, easy maintenance, reviewed by WordPress

    community Cons: no support, lack of custom functionalities, updates are not regular over time Pros: support, new updates regular, 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 reuse code Cons: usually little time invested in review, some things written from scratch
  3. #WCAth2017 Hardware infrastructure 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.
  4. #WCAth2017 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
  5. #WCAth2017 Version control STAGING MASTER PRODUCTION Development Staging Production MASTER

    MASTER PRODUCTION Development Staging Production Keep only theme and custom plugin on GIT/SVN, there is no need for anything else there!
  6. #WCAth2017 Custom theme - 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 wp-config.php - 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 :)
  7. #WCAth2017 Custom plugin - 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 DevinVinson/WordPress-Plugin-Boilerplate - Look at some other popular plugins for best practices - Stick closely to WordPress codex as possible
  8. #WCAth2017 Theme assets 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 with wp_register_script(), wp_enqueue_script(), wp_register_style(), wp_enqueue_style(), wp_localize_script()
  9. #WCAth2017 Deployment - 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
  10. #WCAth2017 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 server usage - 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