Wordpress Development Basics Flashcards

1
Q

Q: What is WordPress development?

A

A: It is the process of building and customizing WordPress websites, themes, and plugins.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Q: Name two key areas of WordPress development.

A

A: Theme development and plugin development.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Q: What is the main programming language used in WordPress?

A

A: PHP.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Q: What other technologies should you know for WordPress development?

A

A: HTML, CSS, JavaScript, and MySQL.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Q: What is a local development environment?

A

A: A setup on your computer to build and test WordPress sites without affecting a live server.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Q: Name two tools to create a local WordPress environment.

A

A: Local by Flywheel and XAMPP.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Q: What files are needed to set up WordPress locally?

A

A: WordPress core files and a database.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Q: What file stores your WordPress database credentials?

A

A: wp-config.php.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Q: Where are WordPress themes stored?

A

A: In the /wp-content/themes/ directory.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Q: Where are WordPress plugins stored?

A

A: In the /wp-content/plugins/ directory.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

Q: What is the purpose of the wp-admin folder?

A

A: It contains files for the WordPress admin dashboard.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

Q: What is the wp-content/uploads/ directory used for?

A

A: It stores all uploaded media files like images and videos.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

Q: What is the minimum requirement for a WordPress theme?

A

A: A style.css file and an index.php file.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

Q: What is the purpose of the functions.php file?

A

A: It allows you to add custom functionality to a theme using PHP.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

Q: What is the WordPress Template Hierarchy?

A

A: A system that determines which template file is used to display content.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

Q: What is the purpose of the header.php file?

A

A: It contains the site’s header markup and is included at the top of each page.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
17
Q

Q: What is the first line required in a custom plugin file?

A

A: The plugin header comment:
<?php
/*
Plugin Name: My Custom Plugin
*/

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
18
Q

Q: Where should custom plugins be stored?

A

A: In the /wp-content/plugins/ directory.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
19
Q

Q: How do you register a custom shortcode in a plugin?

A

A: Using the add_shortcode() function in the plugin code.

20
Q

Q: What function is used to enqueue scripts and styles in plugins?

A

A: wp_enqueue_script() and wp_enqueue_style().

21
Q

Q: What are WordPress hooks?

A

A: Functions that allow you to modify or add functionality to WordPress without editing core files.

22
Q

Q: What are the two types of WordPress hooks?

A

A: Actions and Filters.

23
Q

Q: What is the difference between actions and filters?

A

A: Actions allow you to add functionality, while filters allow you to modify data.

24
Q

Q: How do you add a custom action hook?

A

A: Using the add_action() function.

25
Q

Q: How do you add a custom filter hook?

A

A: Using the add_filter() function.

26
Q

Q: What database management system does WordPress use?

A

A: MySQL.

27
Q

Q: What is the purpose of the wp_posts table?

A

A: It stores all posts, pages, and custom post types.

28
Q

Q: Which table stores user information in WordPress?

A

A: wp_users.

29
Q

Q: What file is used to define database connection settings in WordPress?

A

A: wp-config.php.

30
Q

Q: How can you interact with the database in WordPress?

A

A: Using the $wpdb class.

31
Q

Q: What is the WordPress REST API?

A

A: A feature that allows external applications to interact with WordPress using JSON.

32
Q

Q: Name two common uses for the WordPress REST API.

A

A: Building headless WordPress sites and connecting to third-party applications.

33
Q

Q: What is the Customizer API used for?

A

A: To add settings and controls to the WordPress Customizer.

34
Q

Q: What is the Widget API used for?

A

A: To create custom widgets for WordPress.

35
Q

Q: Why should you never edit WordPress core files?

A

A: Core edits can be overwritten during updates and may introduce security vulnerabilities.

36
Q

Q: How do you sanitize user input in WordPress?

A

A: Using functions like sanitize_text_field() or esc_html().

37
Q

Q: What function should you use to validate user capabilities?

A

A: current_user_can().

38
Q

Q: How do you protect your custom code from unauthorized access?

A

A: Use defined(‘ABSPATH’) or die(); at the start of files.

39
Q

Q: How do you enable debugging in WordPress?

A

A: Set WP_DEBUG to true in the wp-config.php file.

40
Q

Q: What is the WP_DEBUG_LOG constant used for?

A

A: It saves error logs to the debug.log file in the /wp-content/ directory.

41
Q

Q: What is the Query Monitor plugin used for?

A

A: Debugging queries, hooks, and PHP errors in WordPress.

42
Q

Q: How can you disable a plugin causing errors without accessing the admin area?

A

A: Rename the plugin folder in the /wp-content/plugins/ directory.

43
Q

Q: Why should you use a child theme for customizations?

A

A: To ensure updates to the parent theme don’t overwrite customizations.

44
Q

Q: Why is it important to follow coding standards in WordPress?

A

A: For maintainable, readable, and consistent code across projects.

45
Q

Q: What is the official coding standard for WordPress development?

A

A: The WordPress Coding Standards (WPCS).

46
Q

Q: How can you improve website performance during development?

A

A: Use caching, optimize images, and minimize scripts and styles.