{"id":22853,"date":"2025-03-19T19:04:24","date_gmt":"2025-03-19T11:04:24","guid":{"rendered":"https:\/\/www.szlogic.net\/?p=22853"},"modified":"2025-03-19T19:04:25","modified_gmt":"2025-03-19T11:04:25","slug":"wp-dev","status":"publish","type":"post","link":"https:\/\/www.szlogic.net\/en\/learn\/wordpress\/wp-dev\/","title":{"rendered":"Practical WordPress Guide: Deployment, Debugging &amp; Backup"},"content":{"rendered":"<h1 class=\"wp-block-heading has-text-align-center\" style=\"margin-bottom:30px;font-size:36px\">Practical WordPress Guide: Deployment, Debugging &amp; Backup<\/h1>\n\n\n\n<figure class=\"wp-block-image size-full\"><img fetchpriority=\"high\" decoding=\"async\" width=\"1024\" height=\"592\" src=\"https:\/\/www.szlogic.net\/wp-content\/uploads\/2025\/03\/WordPress\u5f00\u53d1\u90e8\u7f72\u6307\u5357.png\" alt=\"WordPress\u5f00\u53d1\u90e8\u7f72\u6307\u5357\" class=\"wp-image-22857\"\/><\/figure>\n\n\n\n<p style=\"margin-top:30px\" class=\"translation-block\">In the modern website development field, <strong><a href=\"https:\/\/www.szlogic.net\/en\/learn\/wordpress\/what-is-wordpress\/\" data-type=\"link\" data-id=\"https:\/\/www.szlogic.net\/learn\/wordpress\/what-is-wordpress\/\" target=\"_blank\" rel=\"noreferrer noopener\">WordPress<\/a><\/strong> has become the platform of choice for developers due to its flexibility and powerful ecosystem. However, truly efficient and stable WordPress development goes beyond theme design or plugin development; it is more crucially about the standardization and optimization of the overall development process and deployment strategy. From setting up the local development environment and code debugging, to ultimately deploying the website smoothly and securely, every step is a cornerstone for ensuring project quality and development efficiency. A well-defined development process not only reduces potential errors and vulnerabilities, improves collaboration efficiency, but also lays a solid foundation for future maintenance and functionality expansion. Proper deployment methods are key to a website's performance, data security, and user experience. A well-organized, interconnected development and deployment system allows developers to handle project requirement changes or technical challenges with ease, truly achieving twice the results with half the effort.<\/p>\n\n\n\n<p class=\"translation-block\">This <strong><a href=\"https:\/\/www.szlogic.net\/en\/category\/learn\/wordpress\/\" data-type=\"link\" data-id=\"https:\/\/www.szlogic.net\/category\/learn\/wordpress\/\" target=\"_blank\" rel=\"noreferrer noopener\">WordPress tutorial<\/a><\/strong> article will systematically outline the core steps of WordPress development and key considerations during deployment, helping developers establish a clear, efficient, and sustainable iterative workflow. Whether you are an independent developer or a team member, you will be able to draw practical experience and optimization ideas from it to enhance project efficiency and quality. Given that the content of the article is quite comprehensive and involves multiple important stages, the blogger has specifically organized the complete table of contents for the article \"WordPress Development (Key Points Guide for WP Development and Deployment)\" as follows. The table of contents adopts a hierarchical structure, covering major chapters and sub-sections. Each title is equipped with a convenient anchor link, allowing readers to quickly jump to the corresponding section by clicking the title, thus facilitating efficient reading and navigation.<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong><a href=\"#local\">WordPress Local Development Environment Setup<\/a><\/strong>\n<ol class=\"wp-block-list\">\n<li><a href=\"#prepare\">Windows Environment Preparation<\/a><\/li>\n\n\n\n<li><a href=\"#nginx\">Installation and Configuration of Nginx Web Server<\/a><\/li>\n\n\n\n<li><a href=\"#php\">PHP Environment Configuration and Version Management<\/a><\/li>\n\n\n\n<li><a href=\"#mysql\">MySQL Database Installation and Configuration<\/a><\/li>\n<\/ol>\n<\/li>\n\n\n\n<li><strong><a href=\"#wp\">WordPress Local Installation and Configuration<\/a><\/strong>\n<ol class=\"wp-block-list\">\n<li><a href=\"#program\">Download Official WordPress Program<\/a><\/li>\n\n\n\n<li><a href=\"#configuration\">Configure Nginx Site to Point to WordPress<\/a><\/li>\n\n\n\n<li><a href=\"#create\">Create WordPress Configuration File<\/a><\/li>\n\n\n\n<li><a href=\"#start\">Start WordPress Installation Wizard<\/a><\/li>\n<\/ol>\n<\/li>\n\n\n\n<li><strong><a href=\"#key\">Key Files for WordPress Theme Development<\/a><\/strong>\n<ol class=\"wp-block-list\">\n<li><a href=\"#style\">style.css<\/a><\/li>\n\n\n\n<li><a href=\"#index\">index.php<\/a><\/li>\n\n\n\n<li><a href=\"#header\">header.php<\/a><\/li>\n\n\n\n<li><a href=\"#function\">functions.php<\/a><\/li>\n<\/ol>\n<\/li>\n\n\n\n<li><strong><a href=\"#debug\">WordPress Debugging and Testing<\/a><\/strong>\n<ol class=\"wp-block-list\">\n<li><a href=\"#mode\">Enable WordPress Debugging Mode<\/a><\/li>\n\n\n\n<li><a href=\"#use\">Use Query Monitor Plugin for Performance and Database Debugging<\/a><\/li>\n\n\n\n<li><a href=\"#dev\">Browser Developer Tools and Mobile Responsiveness Testing<\/a><\/li>\n<\/ol>\n<\/li>\n\n\n\n<li><strong><a href=\"#method\">Two Methods for WordPress Backup and Restoration<\/a><\/strong>\n<ol class=\"wp-block-list\">\n<li><a href=\"#data\">Manually Backup WordPress Files and Database<\/a><\/li>\n\n\n\n<li><a href=\"#restore\">Use Plugin to Perform WordPress File Backup and Restoration<\/a><\/li>\n<\/ol>\n<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"local\" style=\"margin-bottom:30px\">\u2160\u3001WordPress Local Development Environment Setup<\/h2>\n\n\n\n<figure class=\"wp-block-image alignwide size-full\"><img decoding=\"async\" width=\"800\" height=\"463\" src=\"https:\/\/www.szlogic.net\/wp-content\/uploads\/2025\/03\/WordPress\u672c\u5730\u5f00\u53d1\u73af\u5883\u7684\u642d\u5efa.png\" alt=\"WordPress Local Development Environment Setup\" class=\"wp-image-22859\"\/><\/figure>\n\n\n\n<p style=\"margin-top:30px\" class=\"translation-block\">Before starting any WordPress project development, a stable and efficient local development environment is an essential foundation. The so-called WordPress local development environment setup mainly refers to configuring the WNMP environment on a local computer \u2014 it consists of four major components: <strong>Windows Operating System + Nginx Web Server + MySQL Database + PHP Parser<\/strong>, which fully simulates the operating environment of an online server. This is not only the prerequisite for the normal access of WordPress.org, theme and plugin development testing, and code debugging, but also a core part to ensure efficient iteration and secure verification during the development process. Compared to working directly in the production environment, the local development environment offers higher flexibility and security, as it can avoid the risk of crashing the live site due to code errors and also facilitates version control and troubleshooting during team collaboration. Therefore, mastering and properly setting up the WNMP environment is a must for every WordPress developer. Next, the blogger will provide a detailed step-by-step breakdown of deploying each component of WNMP locally with images and instructions, helping everyone easily set up their development environment and lay a solid foundation for subsequent WordPress development work.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"prepare\">1\u3001Windows Environment Preparation<\/h3>\n\n\n\n<p>In the WNMP architecture, the Windows operating system serves as the foundation platform for the development environment, supporting the operation of all service components. Therefore, a good system environment is crucial. It is recommended to use a 64-bit version of the Windows operating system, as it not only fully leverages the performance advantages of modern hardware but also ensures better compatibility and stability with subsequent components such as Nginx, MySQL, and PHP, avoiding runtime errors or environment conflicts caused by mismatched bit versions.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"nginx\">2\u3001Installation and Configuration of Nginx Web Server<\/h3>\n\n\n\n<p>As a lightweight and high-performance web server, Nginx plays a key role in handling client requests, static resource distribution, reverse proxying, and more in the WordPress local development environment. Properly configuring Nginx helps simulate the production environment's operation mechanism and aids developers in identifying potential deployment issues early. This section will detail how to install Nginx on a Windows platform and explain how to adjust core configuration options for WordPress's needs.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\" style=\"margin-bottom:30px\">(1) Step 1: Visit the Nginx official website and choose the version to download<\/h4>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" width=\"2329\" height=\"1441\" src=\"https:\/\/www.szlogic.net\/wp-content\/uploads\/2025\/03\/\u8bbf\u95eeNginx\u5b98\u65b9\u7f51\u7ad9\u5e76\u9009\u62e9\u7248\u672c\u4e0b\u8f7d.png\" alt=\"\u8bbf\u95eeNginx\u5b98\u65b9\u7f51\u7ad9\u5e76\u9009\u62e9\u7248\u672c\u4e0b\u8f7d\" class=\"wp-image-22883\"\/><\/figure>\n\n\n\n<p style=\"margin-top:30px\" class=\"translation-block\">Visit the <strong><a href=\"https:\/\/nginx.org\/en\/download.html\" data-type=\"link\" data-id=\"https:\/\/nginx.org\/en\/download.html\" target=\"_blank\" rel=\"noreferrer noopener nofollow\">Nginx official download page<\/a><\/strong> and select the version for Nginx for Windows (as shown in the image above, the version marked with a red box). Download the Windows version of the Nginx installation package.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\" style=\"margin-bottom:30px\">(2) Step Two: Extract the Nginx.zip File on Windows<\/h4>\n\n\n\n<figure class=\"wp-block-image alignfull size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"800\" height=\"605\" src=\"https:\/\/www.szlogic.net\/wp-content\/uploads\/2025\/03\/\u89e3\u538bNginx.zip\u6587\u4ef6\u5305.png\" alt=\"\u89e3\u538bNginx.zip\u6587\u4ef6\u5305\" class=\"wp-image-22884\"\/><\/figure>\n\n\n\n<p style=\"margin-top:30px\">Extract the downloaded compressed file to the directory where you want to store Nginx, such as: C:\\wnmp\\nginx. This will make the file path clear, making it easier for you to locate, modify, and maintain the files later.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\" style=\"margin-bottom:30px\">(3) Step Three: Start the Nginx Service on Windows<\/h4>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"800\" height=\"357\" src=\"https:\/\/www.szlogic.net\/wp-content\/uploads\/2025\/03\/\u8fd0\u884cnginx.exe-\u542f\u52a8nginx\u670d\u52a1\u6210\u529f.png\" alt=\"\u8fd0\u884cnginx.exe-\u542f\u52a8nginx\u670d\u52a1\u6210\u529f\" class=\"wp-image-22886\"\/><\/figure>\n\n\n\n<p style=\"margin-top:30px\">Navigate to the extracted Nginx folder and run nginx.exe. It's important to note that Nginx does not display an interactive window by default on Windows. Instead, it starts as a background service, and the nginx.exe process will appear in the process list. Therefore, when you double-click nginx.exe or run the command \u201cstart nginx\u201d in the command line, you won't see any prompt or a command window remain open. Don\u2019t be confused by this behavior. After confirming that nginx.exe is running in the Windows system\u2019s process management, visit the URL below in your browser. If you successfully access it and see \u201cWelcome to nginx\u201d as shown in the image above, it means Nginx has started successfully.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>http:&#47;&#47;localhost\/<\/code><\/pre>\n\n\n\n<h4 class=\"wp-block-heading\">(4) Step Four: Configure Nginx to Support PHP on Windows<\/h4>\n\n\n\n<p style=\"margin-bottom:30px\">By default, Nginx cannot parse PHP files. It needs to be configured to support PHP requests. The specific steps are as follows:<\/p>\n\n\n\n<figure class=\"wp-block-image alignfull size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"800\" height=\"459\" src=\"https:\/\/www.szlogic.net\/wp-content\/uploads\/2025\/03\/\u914d\u7f6eNginx\u7684nginx.conf-\u6587\u4ef6.png\" alt=\"\u914d\u7f6eNginx\u7684nginx.conf \u6587\u4ef6\" class=\"wp-image-22887\"\/><\/figure>\n\n\n\n<p style=\"margin-top:30px\">Open the C:\\wnmp\\nginx\\conf\\nginx.conf file. It is recommended to use Visual Studio Code or Notepad++ for editing. Once the file is open, find the server configuration block as highlighted in the image above, and add the following configuration to enable PHP support:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>server {\n    listen       80;\n    server_name  localhost;\n    root   C:\/wnmp\/www;\n    index index.php index.html index.htm;\n\n    location \/ {\n        try_files $uri $uri\/ \/index.php?$args;\n    }\n\n    location ~ \\.php$ {\n        fastcgi_pass   127.0.0.1:9000;\n        fastcgi_index  index.php;\n        fastcgi_param  SCRIPT_FILENAME  $document_root$fastcgi_script_name;\n        include        fastcgi_params;\n    }\n}<\/code><\/pre>\n\n\n\n<ul class=\"wp-block-list\">\n<li>root specifies the directory where the WordPress files are stored, such as C:\/wnmp\/www.<\/li>\n\n\n\n<li>fastcgi_pass is the PHP execution port, which will be set during PHP configuration later.<\/li>\n<\/ul>\n\n\n\n<h4 class=\"wp-block-heading\">(5) Step Five: Configure the Hosts File on Windows (Optional)<\/h4>\n\n\n\n<p>Configuring the Hosts file is an optional step. If you want to use a custom domain name to access WordPress locally, follow the steps below to configure the Hosts file. For example, use szlogic.local. Edit the C:\\Windows\\System32\\drivers\\etc\\hosts file and add the following:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>127.0.0.1  szlogic.local<\/code><\/pre>\n\n\n\n<p>Then, change the server_name in the Nginx configuration file to:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>server_name  szlogic.local;<\/code><\/pre>\n\n\n\n<h4 class=\"wp-block-heading\">(6) Step Six: Restart the Nginx Service on Windows<\/h4>\n\n\n\n<p>After modifying the nginx.conf file, Nginx needs to reload the configuration to apply the changes. You can restart the Nginx service by entering the following command in the Command Prompt (CMD) to apply the latest configuration:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>nginx -s reload<\/code><\/pre>\n\n\n\n<p>Alternatively, you can stop and restart Nginx. The commands to stop and restart Nginx are as follows:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>nginx -s stop\nstart nginx<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"php\">3\u3001PHP Environment Configuration and Version Management<\/h3>\n\n\n\n<p>PHP is the core running language for WordPress, and its version selection and environment configuration directly impact the compatibility and performance of WordPress, as well as its plugins and themes. In this section, we will explain how to install PHP on Windows, configure PHP extensions and parameters, and provide practical solutions for multi-version coexistence and switching, helping developers adapt to different project needs flexibly.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\" style=\"margin-bottom:30px\">(1) Download PHP for Windows<\/h4>\n\n\n\n<figure class=\"wp-block-image alignfull size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"800\" height=\"451\" src=\"https:\/\/www.szlogic.net\/wp-content\/uploads\/2025\/03\/\u4e0b\u8f7dPHP-for-Windows.png\" alt=\"\u4e0b\u8f7dPHP for Windows\" class=\"wp-image-22891\"\/><\/figure>\n\n\n\n<p style=\"margin-top:30px\" class=\"translation-block\">First, we need to visit the <strong><a href=\"https:\/\/windows.php.net\/download\/\" data-type=\"link\" data-id=\"https:\/\/windows.php.net\/download\/\" target=\"_blank\" rel=\"noreferrer noopener nofollow\">PHP official download page<\/a><\/strong>, and then it is recommended to choose the Thread Safe version, as indicated by the red box in the image above. This version is suitable for running with Nginx. Additionally, depending on whether the Windows system is 64-bit (x64) or 32-bit (x86), download the corresponding Zip package. It is recommended to use a newer stable version, such as PHP 8.1 or higher.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\" style=\"margin-bottom:30px\">(2) Extract PHP Files<\/h4>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1000\" height=\"741\" src=\"https:\/\/www.szlogic.net\/wp-content\/uploads\/2025\/03\/\u89e3\u538bPHP\u6587\u4ef6.png\" alt=\"\u89e3\u538bPHP\u6587\u4ef6\" class=\"wp-image-22892\"\/><\/figure>\n\n\n\n<p style=\"margin-top:30px\">As shown in the image above, extract the php.zip file into the same wnmp folder as the Nginx directory, so that all wnmp components are placed in the same directory for easier operation and management. It is important to note that the folder name after extraction should not contain spaces or special characters<\/p>\n\n\n\n<h4 class=\"wp-block-heading\" style=\"margin-bottom:30px\">(3) Configure PHP Environment Variables<\/h4>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1000\" height=\"595\" src=\"https:\/\/www.szlogic.net\/wp-content\/uploads\/2025\/03\/\u914d\u7f6ePHP\u73af\u5883\u53d8\u91cf.png\" alt=\"\u914d\u7f6ePHP\u73af\u5883\u53d8\u91cf\" class=\"wp-image-22894\"\/><\/figure>\n\n\n\n<p style=\"margin-top:30px\">Right-click \"This PC\" or go directly to the Windows system settings interface as shown in the image above &gt; \"Advanced System Settings\" (the entry marked in red in the image) &gt; in the pop-up window, click on the \"Environment Variables\" button at the bottom. Then, in the \"System Variables\" section of the \"Environment Variables\" window, find Path, click \"Edit\", and add the PHP directory path: C:\\wnmp\\php. After confirming and saving, open the Windows Command Line window and execute the following command. If the feedback shows the PHP version information, it means that the PHP environment variable has been configured successfully.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>php -v<\/code><\/pre>\n\n\n\n<p style=\"margin-bottom:30px\">In CMD, the feedback message indicating successful PHP environment variable configuration is shown below:<\/p>\n\n\n\n<figure class=\"wp-block-image alignfull size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"800\" height=\"317\" src=\"https:\/\/www.szlogic.net\/wp-content\/uploads\/2025\/03\/PHP\u73af\u5883\u53d8\u91cf\u914d\u7f6e\u6210\u529f\u7684\u53cd\u9988\u4fe1\u606f.png\" alt=\"PHP\u73af\u5883\u53d8\u91cf\u914d\u7f6e\u6210\u529f\u7684\u53cd\u9988\u4fe1\u606f\" class=\"wp-image-22895\"\/><\/figure>\n\n\n\n<h4 class=\"wp-block-heading\" style=\"margin-top:30px;margin-bottom:30px\">(4) Modify PHP Configuration File (php.ini)<\/h4>\n\n\n\n<figure class=\"wp-block-image alignwide size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"800\" height=\"516\" src=\"https:\/\/www.szlogic.net\/wp-content\/uploads\/2025\/03\/\u4fee\u6539PHP\u914d\u7f6e\u6587\u4ef6.png\" alt=\"\u4fee\u6539PHP\u914d\u7f6e\u6587\u4ef6\" class=\"wp-image-22897\"\/><\/figure>\n\n\n\n<p style=\"margin-top:30px\">Go to the PHP folder, copy the php.ini-development file, and rename it to php.ini. Open the php.ini file with a text editor (either a text editor or VSC will work), and adjust the following configurations as needed:<\/p>\n\n\n\n<h5 class=\"wp-block-heading\">Enable commonly used extensions (remove the semicolon at the beginning <code>;<\/code>\uff09<\/h5>\n\n\n\n<pre class=\"wp-block-code\"><code>extension_dir = \"ext\"\nextension=mysqli\nextension=pdo_mysql\nextension=gd\nextension=mbstring\nextension=openssl\nextension=curl<\/code><\/pre>\n\n\n\n<h5 class=\"wp-block-heading\">Set the timezone (change it to your local timezone)<\/h5>\n\n\n\n<pre class=\"wp-block-code\"><code>date.timezone = Asia\/Shanghai<\/code><\/pre>\n\n\n\n<h4 class=\"wp-block-heading\">\uff085\uff09Configure PHP FastCGI support<\/h4>\n\n\n\n<p>By default, Nginx does not include a PHP parser, and it needs to connect to PHP via FastCGI. First, we need to check the PHP folder to confirm if the php-cgi.exe file exists. Once confirmed, we can execute the command in CMD to start the PHP FastCGI process. After running the command, it will listen on the local 9000 port, waiting for Nginx to pass PHP requests. A reminder for readers: each time the environment is started, this command needs to be run first. For convenience, a batch script can be written to automatically start it in the future. The command to execute is as follows:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>php-cgi.exe -b 127.0.0.1:9000<\/code><\/pre>\n\n\n\n<h4 class=\"wp-block-heading\">(6) Connecting With Nginx Configuration<\/h4>\n\n\n\n<p>Go back to the Nginx configuration tutorial and open C:\\wnmp\\nginx\\conf\\nginx.conf. Make sure the PHP section in the server block is configured as follows (after saving the configuration, restart Nginx):<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>location ~ \\.php$ {\n    fastcgi_pass   127.0.0.1:9000;\n    fastcgi_index  index.php;\n    fastcgi_param  SCRIPT_FILENAME  $document_root$fastcgi_script_name;\n    include        fastcgi_params;\n}<\/code><\/pre>\n\n\n\n<h4 class=\"wp-block-heading\">(7) Verify That PHP is Configured Successfully<\/h4>\n\n\n\n<p>In the Nginx web root directory (e.g., C:\\wnmp\\www), create a new \"info.php\" file and add a line of PHP code inside. Then, visit the URL http:\/\/localhost\/info.php in your browser. If the page successfully displays PHP configuration details, it means PHP has been successfully integrated with Nginx, and the environment setup is complete! At this point, PHP installation and configuration are finished, and it is successfully connected to Nginx, providing the runtime environment for WordPress. Next, we just need to configure the MySQL database and install WordPress. The code written in the \"info.php\" file used for test verification is as follows:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&lt;?php phpinfo(); ?&gt;<\/code><\/pre>\n\n\n\n<p>After visiting http:\/\/localhost\/info.php, if PHP and Nginx are integrated successfully, the page will return configuration details as shown in the following image:<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1000\" height=\"631\" src=\"https:\/\/www.szlogic.net\/wp-content\/uploads\/2025\/03\/PHP\u4e0eNginx-\u96c6\u6210\u6210\u529f\u9875\u9762\u8fd4\u56de\u7684\u914d\u7f6e\u4fe1\u606f.png\" alt=\"PHP\u4e0eNginx \u96c6\u6210\u6210\u529f\u9875\u9762\u8fd4\u56de\u7684\u914d\u7f6e\u4fe1\u606f\" class=\"wp-image-22901\"\/><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"mysql\" style=\"margin-top:30px\">4\u3001MySQL Database Installation and Configuration<\/h3>\n\n\n\n<p>WordPress relies on a powerful database for data storage and management, and MySQL is currently the most widely used relational database system in WordPress websites. In a local development environment, setting up MySQL correctly and initializing the database is a crucial step for the website to function properly. In this section, the author will guide you through the MySQL installation process and help you set up the necessary accounts and permissions for the subsequent WordPress database connection.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\" style=\"margin-bottom:30px\">\uff081\uff09Download the MySQL installation package<\/h4>\n\n\n\n<figure class=\"wp-block-image alignfull size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"800\" height=\"592\" src=\"https:\/\/www.szlogic.net\/wp-content\/uploads\/2025\/03\/\u4e0b\u8f7dMySQL\u5b89\u88c5\u5305.png\" alt=\"\u4e0b\u8f7dMySQL\u5b89\u88c5\u5305\" class=\"wp-image-22903\"\/><\/figure>\n\n\n\n<p style=\"margin-top:30px\" class=\"translation-block\">Visit the <strong><a href=\"https:\/\/dev.mysql.com\/downloads\/mysql\/\" data-type=\"link\" data-id=\"https:\/\/dev.mysql.com\/downloads\/mysql\/\" target=\"_blank\" rel=\"noreferrer noopener nofollow\">MySQL Official Website<\/a><\/strong>, and after creating a MySQL official account, select the MySQL Community Edition suitable for the Windows platform from the download page. The recommended version is shown in the red box in the image above, specifically the ZIP Archive (portable version), which is suitable for a local development environment. After downloading, unzip it to the specified local directory, C:\\wnmp\\mysql.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">(2) Initialize the MySQL data directory<\/h4>\n\n\n\n<p>Open the command line and use the \"cd C:\\wnmp\\mysql\\bin\" command to enter the bin folder of the MySQL decompression directory, and execute the following command to initialize the data directory again (note that C:\\wnmp\\mysql\\data should be replaced with your own data path):<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>mysqld --initialize-insecure --basedir=\"C:\\wnmp\\mysql\" --datadir=\"C:\\wnmp\\mysql\\data\"<\/code><\/pre>\n\n\n\n<p style=\"margin-bottom:30px\">The CMD feedback after the above MySQL initialization data directory command is executed is as shown in the following figure:<\/p>\n\n\n\n<figure class=\"wp-block-image alignfull size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"800\" height=\"363\" src=\"https:\/\/www.szlogic.net\/wp-content\/uploads\/2025\/03\/CMD\u6267\u884c\u521d\u59cb\u5316-MySQL-\u6570\u636e\u76ee\u5f55.png\" alt=\"CMD\u6267\u884c\u521d\u59cb\u5316 MySQL \u6570\u636e\u76ee\u5f55\" class=\"wp-image-22904\"\/><\/figure>\n\n\n\n<h4 class=\"wp-block-heading\" style=\"margin-top:30px\">(3) Create and configure the MySQL my.ini file<\/h4>\n\n\n\n<p>Create a new configuration file \"my.ini\" in the MySQL root directory (C:\\wnmp\\mysql) and add the following code to the file:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&#91;mysqld]\n# \u8bbe\u7f6e\u7aef\u53e3\nport=3306\n\n# \u6570\u636e\u5b58\u653e\u8def\u5f84\nbasedir=C:\/wnmp\/mysql\ndatadir=C:\/wnmp\/mysql\/data\n\n# \u6700\u5927\u8fde\u63a5\u6570\nmax_connections=200\n\n# \u5b57\u7b26\u96c6\u8bbe\u7f6e\ncharacter-set-server=utf8mb4\ncollation-server=utf8mb4_general_ci\n\n# \u5141\u8bb8\u8fdc\u7a0b\u8fde\u63a5\nbind-address=0.0.0.0\n\n# \u7981\u7528\u5bc6\u7801\u8fc7\u671f\ndefault_password_lifetime=0\n\n&#91;client]\ndefault-character-set=utf8mb4<\/code><\/pre>\n\n\n\n<h4 class=\"wp-block-heading\">(4) Install and start the MySQL service<\/h4>\n\n\n\n<p class=\"translation-block\">You can choose to register MySQL as a Windows system service for easier startup and shutdown. The command to register MySQL as a Windows system service is as follows (<strong>you need to run CMD as an administrator, otherwise, you may encounter an installation\/uninstallation service permission denial error<\/strong>):<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>cd C:\\wnmp\\mysql\\bin\nmysqld --install MySQL --defaults-file=\"C:\\wnmp\\mysql\\my.ini\"<\/code><\/pre>\n\n\n\n<p>After executing the above command to register MySQL as a Windows system service, you also need to start MySQL. The command to start MySQL is as follows:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>net start MySQL<\/code><\/pre>\n\n\n\n<h4 class=\"wp-block-heading\">(5) Log in and configure the root user<\/h4>\n\n\n\n<h5 class=\"wp-block-heading\" style=\"margin-top:30px\">Log in to MySQL<\/h5>\n\n\n\n<p>Use the following command to log in to MySQL. You can log in directly because the default password is empty when MySQL is deployed:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>mysql -u root -p<\/code><\/pre>\n\n\n\n<h5 class=\"wp-block-heading\">Set root password<\/h5>\n\n\n\n<p>Before creating a database, you must create a password for the MySQL root account, otherwise you will not be able to proceed to the next step of database creation. You can use the following command to set the root password:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>ALTER USER 'root'@'localhost' IDENTIFIED BY 'yourpassword';<\/code><\/pre>\n\n\n\n<h5 class=\"wp-block-heading\">Create WordPress Database<\/h5>\n\n\n\n<p>Execute the following CMD command to create the WordPress database we will need to deploy WordPress.org. The command to create the WordPress database is as follows:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>CREATE DATABASE wordpress DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;<\/code><\/pre>\n\n\n\n<h5 class=\"wp-block-heading\">Create a WordPress-specific user and authorize it<\/h5>\n\n\n\n<p>Use the following commands to create a WordPress-specific user for the WordPress database and authorize it. Execute the commands as follows:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>CREATE USER 'wpuser'@'localhost' IDENTIFIED BY 'wppassword';\nGRANT ALL PRIVILEGES ON wordpress.* TO 'wpuser'@'localhost';\nFLUSH PRIVILEGES;<\/code><\/pre>\n\n\n\n<p>At this point, the local deployment and configuration of the MySQL database on Windows has been successfully completed, and the database is ready for WordPress to use. With the previously configured Nginx and PHP environment, the entire WNMP architecture has been basically built, and the next step is to install WordPress locally.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"wp\" style=\"margin-bottom:30px\">\u2161\u3001WordPress Local Installation and Configuration<\/h2>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"592\" src=\"https:\/\/www.szlogic.net\/wp-content\/uploads\/2025\/03\/\u90e8\u7f72WordPress.org\u7a0b\u5e8f.png\" alt=\"Deploy WordPress.org Program\" class=\"wp-image-22647\"\/><\/figure>\n\n\n\n<p style=\"margin-top:30px\">After completing the local deployment of Nginx, PHP, and MySQL, the next step is to install the WordPress program under Windows, connect the various components in series, build a complete and operational WordPress development environment, and achieve access, development, editing, and operation on the Windows local machine. In this section, the blogger will gradually explain the local download, installation, configuration, and startup process of WordPress.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"program\" style=\"margin-bottom:30px\">1\u3001Download Official WordPress Program<\/h3>\n\n\n\n<figure class=\"wp-block-image alignfull size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"800\" height=\"441\" src=\"https:\/\/www.szlogic.net\/wp-content\/uploads\/2025\/03\/\u4e0b\u8f7dWordPress\u5b98\u65b9\u7a0b\u5e8f.png\" alt=\"Download Official WordPress Program\" class=\"wp-image-22912\"\/><\/figure>\n\n\n\n<p style=\"margin-top:30px\" class=\"translation-block\">Visit the <strong><a href=\"https:\/\/cn.wordpress.org\/download\/\" data-type=\"link\" data-id=\"https:\/\/cn.wordpress.org\/download\/\" target=\"_blank\" rel=\"noreferrer noopener nofollow\">WordPress official download page<\/a><\/strong>, click to download the latest version of the WordPress.org zip installation package, as shown in the image above. At the time of writing this article, the latest version of WordPress.org is 6.7.2. After downloading the WordPress installation package, extract it to our local website root directory (C:\\wnmp\\www\\wordpress).<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"configuration\" style=\"margin-bottom:30px\">2\u3001Configure Nginx Site to Point to WordPress<\/h3>\n\n\n\n<figure class=\"wp-block-image alignfull size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"800\" height=\"636\" src=\"https:\/\/www.szlogic.net\/wp-content\/uploads\/2025\/03\/\u914d\u7f6eNginx\u7ad9\u70b9\u6307\u5411WordPress.png\" alt=\"Configure Nginx Site to Point to WordPress\" class=\"wp-image-22913\"\/><\/figure>\n\n\n\n<p style=\"margin-top:30px\">Enter the Nginx directory and open the nginx.conf configuration file. In the server block as shown in the image above, set the root path to point to the WordPress directory you just extracted (C:\/wnmp\/www\/wordpress). Replace the following line of code in the server block or add \"wordpress\" to the original \"root C:\/wnmp\/www\/;\" (as highlighted in the red box in the image above). After modifying the configuration, save the file and restart Nginx to apply the new settings.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>root   C:\/wnmp\/www\/wordpress;<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"create\">3\u3001Create WordPress Configuration File<\/h3>\n\n\n\n<p>Enter the WordPress folder and locate the file \"wp-config-sample.php\". Make a backup copy of this file and rename the copied file to \"wp-config.php\". Open this file using VSC. Once the file is opened, as shown in the image above, configure the MySQL connection information in the code. Enter the required database name, username, and password as per the comments in the following PHP code:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>define( 'DB_NAME', 'wordpress' );\ndefine( 'DB_USER', 'root' ); \/\/ \u4e0a\u9762\u521b\u5efa\u6570\u636e\u5e93\u65f6\u7684'root'\u6216 'wpuser'\ndefine( 'DB_PASSWORD', '\u4f60\u7684MySQL\u5bc6\u7801' );\ndefine( 'DB_HOST', 'localhost' );\ndefine( 'DB_CHARSET', 'utf8mb4' );\ndefine( 'DB_COLLATE', '' );<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"start\" style=\"margin-bottom:30px\">4\u3001Start WordPress Installation Wizard<\/h3>\n\n\n\n<figure class=\"wp-block-image alignfull size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"800\" height=\"535\" src=\"https:\/\/www.szlogic.net\/wp-content\/uploads\/2025\/03\/\u542f\u52a8WordPress\u5b89\u88c5\u5411\u5bfc.png\" alt=\"Start WordPress Installation Wizard\" class=\"wp-image-22917\"\/><\/figure>\n\n\n\n<p style=\"margin-top:30px\">Before officially launching the WordPress installation wizard, it is important to ensure that all core components of the local development environment\u2014Nginx, PHP, and MySQL\u2014are successfully deployed and running. These three components work together to provide the foundation for the normal access and operation of a WordPress site, and none can be missing. Nginx is responsible for handling frontend HTTP requests and forwarding them to PHP for parsing. PHP drives the core logic of WordPress, while the MySQL database is used to store all the content and configuration information of the site. Only when these three services are properly started and work together seamlessly, will the WordPress installation wizard run smoothly, avoiding connection errors or permission issues. Next, we will detail the process of launching and configuring the WordPress installation wizard, assuming the environment is ready.<\/p>\n\n\n\n<p>In the browser, use \"http:\/\/localhost\/\" as the URL to connect to WordPress and launch the installation process. If all configurations for the WordPress environment components were done correctly earlier, it will automatically redirect to the WordPress installation page as shown in the image above. Follow the on-screen instructions to fill in the website information. Once the information is entered, click the \"Install WordPress\" button at the bottom of the page. After a brief moment, the installation will be completed, and you can log in to the backend directly.<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li class=\"translation-block\"><strong>Site Title:<\/strong> Used to define the name of the WordPress site, which will be displayed in the browser title bar and on the homepage after installation. It can be customized according to the project requirements and can be modified at any time in the backend later.<\/li>\n\n\n\n<li class=\"translation-block\"><strong>Username (Administrator Username):<\/strong> The super administrator account name used to log into the WordPress backend. It is recommended to avoid using the default \"admin\" for better security and to make future management easier.<\/li>\n\n\n\n<li class=\"translation-block\"><strong>Password (Administrator Account Password):<\/strong> The login password used in conjunction with the administrator username. To ensure account security, it is recommended to set a strong password combination that includes letters, numbers, and special characters.<\/li>\n\n\n\n<li class=\"translation-block\"><strong>Your Email (Administrator Account Email\/Site Email):<\/strong> Used to receive WordPress system notifications (such as password resets, comment alerts, etc.). Even in a local environment, it is recommended to provide a valid email address for future use during migration.<\/li>\n\n\n\n<li class=\"translation-block\"><strong>Search Engine Visibility:<\/strong> This option controls whether search engines are allowed to index the site, which is an important setting for SEO performance. However, in a local development environment, there is no need to focus on <strong><a href=\"https:\/\/www.szlogic.net\/en\/seo\/\" data-type=\"link\" data-id=\"https:\/\/www.szlogic.net\/seo\/\" target=\"_blank\" rel=\"noreferrer noopener\">SEO optimization<\/a><\/strong>. Therefore, this setting can be ignored, and the system's default settings can be kept.<\/li>\n<\/ul>\n\n\n\n<p style=\"margin-bottom:30px\">The page feedback after WordPress is successfully installed in the local environment is shown in the following image:<\/p>\n\n\n\n<figure class=\"wp-block-image alignfull size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"800\" height=\"392\" src=\"https:\/\/www.szlogic.net\/wp-content\/uploads\/2025\/03\/WordPress\u6210\u529f\u5b89\u88c5\u5230\u672c\u5730\u73af\u5883.png\" alt=\"WordPress\u6210\u529f\u5b89\u88c5\u5230\u672c\u5730\u73af\u5883\" class=\"wp-image-22919\"\/><\/figure>\n\n\n\n<p style=\"margin-top:30px;margin-bottom:30px\">The interface shown in the following image is displayed after successfully logging into the WordPress admin dashboard on the local environment:<\/p>\n\n\n\n<figure class=\"wp-block-image alignfull size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"800\" height=\"447\" src=\"https:\/\/www.szlogic.net\/wp-content\/uploads\/2025\/03\/WordPress\u5b89\u88c5\u5230\u672c\u5730\uff0c\u6210\u529f\u767b\u9646\u7ba1\u7406\u540e\u53f0.png\" alt=\"WordPress\u5b89\u88c5\u5230\u672c\u5730\uff0c\u6210\u529f\u767b\u9646\u7ba1\u7406\u540e\u53f0\" class=\"wp-image-22922\"\/><\/figure>\n\n\n\n<p style=\"margin-top:30px\">At this point, the entire process of setting up the WordPress local development environment is officially complete. From the local WNMP environment setup, database configuration, to WordPress installation and initialization, every step has been successfully completed. You can now confidently proceed with theme development, plugin development, or functionality testing locally, with a highly flexible and controllable development space.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"key\" style=\"margin-bottom:30px\">\u2162\u3001Key Files for WordPress Theme Development<\/h2>\n\n\n\n<figure class=\"wp-block-image alignwide size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"800\" height=\"428\" src=\"https:\/\/www.szlogic.net\/wp-content\/uploads\/2025\/03\/WordPress\u4e3b\u9898\u5f00\u53d1\u7684\u5173\u952e\u6587\u4ef6.png\" alt=\"Key Files for WordPress Theme Development\" class=\"wp-image-22924\"\/><\/figure>\n\n\n\n<p style=\"margin-top:30px\">When developing a WordPress theme, there are several basic and essential files that must be created. Together, they form the basic structure of the theme. Whether it's a simple blog theme or a complex corporate website, these files are the core elements that allow WordPress to recognize, load, and run the theme properly. In this chapter, the blogger will explain in detail the role of these four essential files and their key points for writing, helping developers build a theme skeleton that complies with WordPress standards.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"style\">1\u3001style.css<\/h3>\n\n\n\n<p class=\"translation-block\">style.css is the main stylesheet file of a WordPress theme. It is used not only to define the front-end <strong><a href=\"https:\/\/en.wikipedia.org\/wiki\/CSS\" data-type=\"link\" data-id=\"https:\/\/en.wikipedia.org\/wiki\/CSS\" target=\"_blank\" rel=\"noreferrer noopener nofollow\">CSS<\/a><\/strong> styles but also plays a role in describing the theme's metadata. WordPress recognizes the theme's name, version, author, and other basic information through the header comments in the style.css file.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">(1) Structure description<\/h4>\n\n\n\n<pre class=\"wp-block-code\"><code>\/*\nTheme Name: My Custom Theme\nTheme URI: https:\/\/example.com\/\nAuthor: Your Name\nAuthor URI: https:\/\/example.com\/\nDescription: A custom WordPress theme for demonstration.\nVersion: 1.0\nLicense: GNU General Public License v2 or later\nLicense URI: https:\/\/www.gnu.org\/licenses\/gpl-2.0.html\nText Domain: mycustomtheme\nTags: custom, responsive, blog\n*\/<\/code><\/pre>\n\n\n\n<ul class=\"wp-block-list\">\n<li class=\"translation-block\"><strong>Theme Name\uff1a<\/strong> The name of the theme, which is displayed in the WordPress admin theme list.<\/li>\n\n\n\n<li class=\"translation-block\"><strong>Description\uff1a<\/strong> A brief introduction of the theme.<\/li>\n\n\n\n<li class=\"translation-block\"><strong>Version, Author<\/strong> and other information are useful for version management and copyright declaration.<\/li>\n\n\n\n<li class=\"translation-block\"><strong>Text Domain<\/strong> is used for internationalization and translation, which is essential when developing a multilingual theme.<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"index\">2\u3001index.php<\/h3>\n\n\n\n<p>index.php is the core template file of a WordPress theme and is an essential file in the theme folder. It is the fallback file at the bottom of the template hierarchy. If more specific template files do not exist, WordPress will default to loading index.php to render the page.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">(1) Basic structure<\/h4>\n\n\n\n<pre class=\"wp-block-code\"><code>&lt;?php get_header(); ?&gt;\n\n&lt;main&gt;\n    &lt;?php\n    if ( have_posts() ) :\n        while ( have_posts() ) : the_post();\n            the_title( &#039;&lt;h2&gt;&#039;, &#039;&lt;\/h2&gt;&#039; );\n            the_content();\n        endwhile;\n    else :\n        echo &#039;&lt;p&gt;No content found.&lt;\/p&gt;&#039;;\n    endif;\n    ?&gt;\n&lt;\/main&gt;\n\n&lt;?php get_footer(); ?&gt;<\/code><\/pre>\n\n\n\n<h4 class=\"wp-block-heading\">(2) Key points for function calls in the index.php file<\/h4>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Use get_header() and get_footer() to include the header and footer templates.<\/li>\n\n\n\n<li>Use the WordPress loop (have_posts() and the_post()) to output the list of posts or a single post's content.<\/li>\n\n\n\n<li>Ensure that index.php has basic page rendering capabilities to prevent blank pages when accessing the site.<\/li>\n<\/ol>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"header\">3\u3001header.php<\/h3>\n\n\n\n<p class=\"translation-block\">&lt;header.php is used to store the website&#039;s header structure, including meta information within the  tag, CSS\/<strong><a href=\"https:\/\/wuu.wikipedia.org\/wiki\/JavaScript\" data-type=\"link\" data-id=\"https:\/\/wuu.wikipedia.org\/wiki\/JavaScript\" target=\"_blank\" rel=\"noreferrer noopener nofollow\">JS<\/a><\/strong> file imports, the website logo, navigation menu, and other content. It is loaded by other template files via the get_header() function, enabling unified management and reuse of the site's header.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">(1) Example structure<\/h4>\n\n\n\n<pre class=\"wp-block-code\"><code>&lt;!DOCTYPE html&gt;\n&lt;html no numeric noise key 1007&gt;\n&lt;head&gt;\n    &lt;meta charset=&quot;&lt;?php bloginfo( &#039;charset&#039; ); ?&gt;&quot;&gt;\n    &lt;meta name=&quot;viewport&quot; content=&quot;width=device-width, initial-scale=1.0&quot;&gt;\n    &lt;title&gt;&lt;?php wp_title(); ?&gt;&lt;\/title&gt;\n    &lt;?php wp_head(); ?&gt;\n&lt;\/head&gt;\n&lt;body no numeric noise key 1003&gt;\n\n&lt;header&gt;\n    &lt;div class=&quot;site-logo&quot;&gt;\n        &lt;a href=&quot;\/en\/&lt;\/?php echo home_url(); ?&gt;&quot;&gt;&lt;?php bloginfo( &#039;name&#039; ); ?&gt;&lt;\/a&gt;\n    &lt;\/div&gt;\n    &lt;nav&gt;\n        &lt;?php wp_nav_menu( array( &#039;theme_location&#039; =&gt; &#039;primary&#039; ) ); ?&gt;\n    &lt;\/nav&gt;\n&lt;\/header&gt;<\/code><\/pre>\n\n\n\n<h4 class=\"wp-block-heading\">(2) Key points of the header.php file function<\/h4>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Use the wp_head() function to ensure that WordPress plugins or themes can dynamically insert necessary CSS\/JS resources.<\/li>\n\n\n\n<li>Use bloginfo() to output site name, encoding and other information to keep it dynamic.<\/li>\n\n\n\n<li>The navigation menu is mounted via wp_nav_menu(), and the menu can be customized in the background.<\/li>\n<\/ol>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"function\">4\u3001functions.php<\/h3>\n\n\n\n<p>Functions.php is a theme's function file, similar to a \"plugin\" for WordPress themes, used to extend theme functionality or modify WordPress default behavior. You can register navigation menus, enable theme support features, load style scripts, define custom functions, etc.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">(1) Common usage examples<\/h4>\n\n\n\n<pre class=\"wp-block-code\"><code>&lt;?php\n\/\/ \u6ce8\u518c\u5bfc\u822a\u83dc\u5355\nfunction mytheme_register_menus() {\n    register_nav_menus( array(\n        'primary' =&gt; __( 'Primary Menu', 'mycustomtheme' ),\n    ) );\n}\nadd_action( 'init', 'mytheme_register_menus' );\n\n\/\/ \u542f\u7528\u4e3b\u9898\u652f\u6301\nfunction mytheme_theme_setup() {\n    add_theme_support( 'title-tag' );\n    add_theme_support( 'post-thumbnails' );\n}\nadd_action( 'after_setup_theme', 'mytheme_theme_setup' );\n\n\/\/ \u52a0\u8f7d\u6837\u5f0f\u548c\u811a\u672c\nfunction mytheme_enqueue_scripts() {\n    wp_enqueue_style( 'main-style', get_stylesheet_uri() );\n    wp_enqueue_script( 'main-js', get_template_directory_uri() . '\/js\/main.js', array(), null, true );\n}\nadd_action( 'wp_enqueue_scripts', 'mytheme_enqueue_scripts' );\n?&gt;<\/code><\/pre>\n\n\n\n<h4 class=\"wp-block-heading\">(2) Key points in the functions.php file<\/h4>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Hook mechanism: add_action(), add_filter() gives you flexible control over WordPress behavior.<\/li>\n\n\n\n<li>Theme functions such as registration menu, sidebar, featured images, etc. are configured through functions.php.<\/li>\n\n\n\n<li>It is an important entry file for developers to customize theme features, optimize performance, and integrate third-party libraries.<\/li>\n<\/ol>\n\n\n\n<p>The above four files, style.css, index.php, header.php and functions.php, form the most basic framework for WordPress theme development. Mastering their uses and standard writing methods can help developers quickly build a runnable and scalable theme structure. On this basis, you can further add more template files such as single.php, page.php, footer.php, etc. to enrich the theme functions and meet the actual project needs.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"debug\" style=\"margin-bottom:30px\">\u2163\u3001WordPress Debugging and Testing<\/h2>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"592\" src=\"https:\/\/www.szlogic.net\/wp-content\/uploads\/2025\/03\/WordPress\u8c03\u8bd5\u548c\u6d4b\u8bd5.png\" alt=\"WordPress Debugging and Testing\" class=\"wp-image-22858\"\/><\/figure>\n\n\n\n<p style=\"margin-top:30px\">In WordPress theme or plugin development, debugging and testing are crucial steps to ensure code quality and website stability. A good debugging configuration not only helps developers quickly identify issues but also improves development efficiency and prevents uncontrollable errors after going live. This section will focus on debugging methods and testing techniques in WordPress development, introducing some efficient and practical debugging configurations and tools to ensure issues in the development environment can be located and fixed in a timely manner.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"mode\" style=\"margin-bottom:30px\">1\u3001Enable WordPress Debug Mode (WP_DEBUG)<\/h3>\n\n\n\n<figure class=\"wp-block-image alignfull size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"800\" height=\"511\" src=\"https:\/\/www.szlogic.net\/wp-content\/uploads\/2025\/03\/\u542f\u7528-WordPress-\u8c03\u8bd5\u6a21\u5f0f.png\" alt=\"\u542f\u7528 WordPress \u8c03\u8bd5\u6a21\u5f0f\" class=\"wp-image-22929\"\/><\/figure>\n\n\n\n<p style=\"margin-top:30px\">WordPress has a built-in debugging mechanism. By enabling the WP_DEBUG constant, developers can view PHP errors, warnings, notices, and other information in real-time, making it easier to troubleshoot issues. When used in combination with other debugging constants, error information can also be logged to a file, improving issue tracking control. Open the wp-config.php file and modify the configuration as shown in the red box in the screenshot above to enable WordPress debug mode (WP_DEBUG). After the configuration, error messages will be logged in the \/wp-content\/debug.log file for easy viewing. During the local development phase, it is recommended to keep WP_DEBUG enabled to identify potential issues in a timely manner. In the production environment, error display should be turned off to avoid exposing sensitive information, while keeping log records for backend troubleshooting.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>define( 'WP_DEBUG', true ); \/\/ \u542f\u7528\u8c03\u8bd5\u6a21\u5f0f\ndefine( 'WP_DEBUG_LOG', true ); \/\/ \u5c06\u9519\u8bef\u5199\u5165\u65e5\u5fd7\ndefine( 'WP_DEBUG_DISPLAY', false ); \/\/ \u4e0d\u5728\u9875\u9762\u4e0a\u663e\u793a\u9519\u8bef\u4fe1\u606f\ndefine( 'SCRIPT_DEBUG', true ); \/\/ \u5f3a\u5236\u52a0\u8f7d\u672a\u538b\u7f29\u7248\u7684\u6838\u5fc3JS\/CSS<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"use\" style=\"margin-bottom:30px\">2\u3001Use Query Monitor Plugin for Performance and Database Debugging<\/h3>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"2537\" height=\"792\" src=\"https:\/\/www.szlogic.net\/wp-content\/uploads\/2025\/03\/\u4f7f\u7528Query-Monitor\u63d2\u4ef6\u8fdb\u884c\u6027\u80fd\u4e0e\u6570\u636e\u5e93\u8c03\u8bd5.png\" alt=\"Use Query Monitor Plugin for Performance and Database Debugging\" class=\"wp-image-22931\"\/><\/figure>\n\n\n\n<p style=\"margin-top:30px\" class=\"translation-block\"><strong><a href=\"https:\/\/wordpress.org\/plugins\/query-monitor\/\" data-type=\"link\" data-id=\"https:\/\/wordpress.org\/plugins\/query-monitor\/\" target=\"_blank\" rel=\"noreferrer noopener nofollow\">Query Monitor<\/a><\/strong> is a powerful WordPress debugging plugin. As shown in the image above, it integrates various features such as database query analysis, HTTP request monitoring, PHP error capture, and Hooks loading tracking. It is an essential debugging tool for developers.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">(1) Query Monitor Feature Highlights<\/h4>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Real-time display of page loading time, memory usage, database query times and time consumption.<\/li>\n\n\n\n<li>Lists each SQL query statement and its call stack to help locate slow or repeated queries.<\/li>\n\n\n\n<li>Displays the template files loaded by the current page and the Conditional Tags matching results.<\/li>\n\n\n\n<li>Tracks loaded hooks, themes and plugins' function load paths.<\/li>\n\n\n\n<li>Supports multi-site, multi-language, and REST API debugging views.<\/li>\n<\/ul>\n\n\n\n<h4 class=\"wp-block-heading\">(2) How to use Query Monitor<\/h4>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Install and enable the \"Query Monitor\" plugin from the Backend Plugin Marketplace.<\/li>\n\n\n\n<li>Once enabled, a debug menu will appear in the WordPress administration toolbar. Click it to expand detailed debugging information.<\/li>\n\n\n\n<li>Locate and optimize database performance bottlenecks, code errors, and loading order issues.<\/li>\n<\/ul>\n\n\n\n<h4 class=\"wp-block-heading\">(3) Query Monitor usage suggestions<\/h4>\n\n\n\n<ul class=\"wp-block-list\">\n<li>It works best with WP_DEBUG mode.<\/li>\n\n\n\n<li>This plugin is only recommended to be enabled in the development environment to avoid adding performance burden in the formal environment.<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"dev\" style=\"margin-bottom:30px\">3\u3001Browser Developer Tools and Mobile Responsiveness Testing<\/h3>\n\n\n\n<figure class=\"wp-block-image alignfull size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"800\" height=\"425\" src=\"https:\/\/www.szlogic.net\/wp-content\/uploads\/2025\/03\/\u6d4f\u89c8\u5668\u5f00\u53d1\u8005\u5de5\u5177\u4e0e\u79fb\u52a8\u7aef\u54cd\u5e94\u6d4b\u8bd5.png\" alt=\"Browser Developer Tools and Mobile Responsiveness Testing\" class=\"wp-image-22930\"\/><\/figure>\n\n\n\n<p style=\"margin-top:30px\" class=\"translation-block\">In addition to WordPress's internal debugging mechanisms, modern browsers' built-in developer tools (such as Chrome DevTools) are also important tools for frontend debugging. Through these tools, you can analyze <strong><a href=\"https:\/\/zh.wikipedia.org\/wiki\/HTML\" data-type=\"link\" data-id=\"https:\/\/zh.wikipedia.org\/wiki\/HTML\" target=\"_blank\" rel=\"noreferrer noopener nofollow\">HTML<\/a><\/strong> structure, CSS styles, JS execution, network requests, and more, allowing you to quickly locate frontend issues. These tools are especially useful during theme development.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">(1) Key Functions<\/h4>\n\n\n\n<ul class=\"wp-block-list\">\n<li class=\"translation-block\"><strong>Elements\uff08Elements\uff09:<\/strong> View and modify the DOM structure and CSS styles in real time to debug layout issues.<\/li>\n\n\n\n<li class=\"translation-block\"><strong>Console\uff08Console\uff09:<\/strong> View JS errors and debug information, and execute debug code.<\/li>\n\n\n\n<li class=\"translation-block\"><strong>Network\uff08Network\uff09:<\/strong> Analyze page loading resources, request time, and locate slow-loading resources<\/li>\n\n\n\n<li class=\"translation-block\"><strong>Device Mode\uff08Device Mode\uff09:<\/strong> Switch to mobile device view to test responsive layout compatibility.<\/li>\n\n\n\n<li class=\"translation-block\"><strong>Lighthouse\uff08Performance Report\uff09:<\/strong> Generate a page performance report to evaluate loading speed, accessibility, and more.<\/li>\n<\/ul>\n\n\n\n<h4 class=\"wp-block-heading\">(2) Usage Tips<\/h4>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Right-click a page element \u2192 Inspect to quickly locate the element and its style source.<\/li>\n\n\n\n<li>Simulate website display under different resolutions and check whether menus, buttons, content areas, etc. are adapted.<\/li>\n\n\n\n<li>Use console output (console.log()) to assist JS interactive debugging.<\/li>\n<\/ul>\n\n\n\n<p>WordPress debugging and testing not only rely on its own mechanisms, such as WP_DEBUG and Query Monitor plug-ins, but also need to be combined with browser tools, error log analysis and other methods to form a complete debugging closed loop. Through scientific debugging and sufficient testing, developers can efficiently solve problems, optimize performance, and prepare for subsequent deployment and maintenance.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"method\" style=\"margin-bottom:30px\">\u2164\u3001Two Methods for WordPress Backup and Restoration<\/h2>\n\n\n\n<figure class=\"wp-block-image alignfull size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"800\" height=\"463\" src=\"https:\/\/www.szlogic.net\/wp-content\/uploads\/2025\/03\/WordPress\u5907\u4efd\u548c\u6062\u590d.png\" alt=\"WordPress\u5907\u4efd\u548c\u6062\u590d\" class=\"wp-image-22861\"\/><\/figure>\n\n\n\n<p style=\"margin-top:30px\">During the WordPress development and testing phase, frequent code modifications, plugin installations, theme adjustments, and even database operations carry unpredictable risks. If configuration errors, data corruption, or accidental operations occur, the site may fail to function properly, potentially leading to data loss. A comprehensive backup and recovery mechanism is the first line of defense against such issues. Whether it's switching versions during development or restoring environments during testing, timely and effective backups allow developers to quickly revert to a stable state, significantly reducing the cost of recovery and enhancing development efficiency and project security. In this chapter, which is also the final chapter of this article, the blogger will introduce two commonly used backup and recovery methods in WordPress, covering file-level, database-level, and automated backup tools. This will help developers establish a robust and reliable backup strategy for local development, testing, and even production deployment, providing solid security for the entire development process.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"data\" style=\"margin-bottom:30px\">1\u3001Manually Backup WordPress Files and Database<\/h3>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1854\" height=\"1322\" src=\"https:\/\/www.szlogic.net\/wp-content\/uploads\/2025\/03\/\u624b\u52a8\u5907\u4efdWordPress\u6587\u4ef6\u4e0e\u6570\u636e\u5e93.png\" alt=\"Manually Backup WordPress Files and Database\" class=\"wp-image-22937\"\/><\/figure>\n\n\n\n<p style=\"margin-top:30px\">Manual backups are the most basic and straightforward backup method, especially suitable for individual developers who need temporary version saving and restoration in local or testing environments. The content of a WordPress site is primarily made up of two parts: files and the database. The file portion includes the core WordPress program files, theme files, plugin files, and multimedia files uploaded by users, which are usually located under the WordPress installation directory. The data in the wp-content folder is especially crucial. The database, on the other hand, stores all the site's posts, pages, user information, settings, and other dynamic data. To back up the files, simply copy the entire WordPress installation directory to a secure location on the local hard drive. It is recommended to name the backups by date or project phase for easy version identification. Additionally, don't forget to back up the configuration file wp-config.php, as it contains the database connection information and custom configurations.<\/p>\n\n\n\n<p class=\"translation-block\">For database backups, you can export the database using <strong><a href=\"https:\/\/www.phpmyadmin.net\/\" data-type=\"link\" data-id=\"https:\/\/www.phpmyadmin.net\/\" target=\"_blank\" rel=\"noreferrer noopener nofollow\">phpMyAdmin<\/a><\/strong> or command-line tools. In phpMyAdmin, select the corresponding WordPress database, click \"Export,\" and choose the SQL format to export a complete data snapshot. Command-line users can use the `mysqldump` command to export the database, ensuring data consistency and integrity. The restoration process is also simple. To restore files, replace the backup folder with the one in the WordPress directory. For the database, you can import the previously exported SQL file via phpMyAdmin or use the command line to re-import the data into the database. This manual method is flexible, making it suitable for local development when frequently switching versions or testing new features before backups. However, it also comes with the risk of frequent operations and potential omissions, making it more suitable for small-scale development environments.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"restore\" style=\"margin-bottom:30px\">2\u3001Use Plugin to Perform WordPress File Backup and Restoration<\/h3>\n\n\n\n<figure class=\"wp-block-image alignfull size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"800\" height=\"398\" src=\"https:\/\/www.szlogic.net\/wp-content\/uploads\/2025\/03\/UpdraftPlus-Backup\u63d2\u4ef6\u5907\u4efd\u7f51\u7ad9.png\" alt=\"UpdraftPlus Backup\u63d2\u4ef6\u5907\u4efd\u7f51\u7ad9\" class=\"wp-image-22935\"\/><\/figure>\n\n\n\n<p style=\"margin-top:30px\" class=\"translation-block\">For development projects that require frequent backups or involve multiple collaborators, manual backups can be time-consuming, labor-intensive, and prone to errors. In this case, using an automated backup plugin can significantly improve efficiency and reliability. <strong><a href=\"https:\/\/teamupdraft.com\/updraftplus\/\" data-type=\"link\" data-id=\"https:\/\/teamupdraft.com\/updraftplus\/\" target=\"_blank\" rel=\"noreferrer noopener nofollow\">UpdraftPlus<\/a><\/strong> is a highly praised automated backup plugin within the WordPress ecosystem. It supports one-click backups of WordPress files and databases, and can automatically sync backup data to various cloud storage services such as <strong><a href=\"https:\/\/workspace.google.com\/intl\/zh-CN\/products\/drive\/\" data-type=\"link\" data-id=\"https:\/\/workspace.google.com\/intl\/zh-CN\/products\/drive\/\" target=\"_blank\" rel=\"noreferrer noopener nofollow\">Google Drive<\/a><\/strong>, <strong><a href=\"https:\/\/www.dropbox.com\/\" data-type=\"link\" data-id=\"https:\/\/www.dropbox.com\/\" target=\"_blank\" rel=\"noreferrer noopener nofollow\">Dropbox<\/a><\/strong>, and <strong><a href=\"https:\/\/www.microsoft.com\/en-us\/microsoft-365\/onedrive\/online-cloud-storage\" data-type=\"link\" data-id=\"https:\/\/www.microsoft.com\/en-us\/microsoft-365\/onedrive\/online-cloud-storage\" target=\"_blank\" rel=\"noreferrer noopener nofollow\">OneDrive<\/a><\/strong>, avoiding the risks of local hard drive failure or accidental deletion. The process of installing the UpdraftPlus plugin is the same as installing any regular plugin. Go to the WordPress dashboard, find Plugins \u2192 Add New, search for \"UpdraftPlus,\" and activate it. After activation, users can find the dedicated UpdraftPlus interface in the settings menu, which is intuitive and easy to configure. Users can freely set the content to be backed up, including databases, themes, plugins, uploaded files, etc., and can choose the backup frequency, such as daily, weekly, or on-demand.<\/p>\n\n\n\n<p>Even more advantageously, UpdraftPlus supports a one-click restore function. Backup files can be directly restored to the current site through the plugin interface, eliminating the need to manually replace files or import databases. This is especially useful during the development and testing phases when code, plugins, or themes are frequently adjusted, and when issues or configuration chaos arise. Simply clicking the restore button allows you to roll back to the stable state at the time of backup, greatly reducing manual intervention and the likelihood of errors. Additionally, UpdraftPlus allows you to set multiple remote storage backups for redundancy and supports backup encryption to ensure data security. This automated backup method is suitable for synchronized backup strategies in both development and production environments, particularly for WordPress projects that require long-term maintenance and collaboration among multiple people.<\/p>\n\n\n\n<p class=\"translation-block\"><strong>Conclusion:<\/strong> WordPress development and deployment is not simply about setting up a program online; it is a systematic process involving several stages, such as environment setup, theme development, debugging and testing, backup and recovery, and final deployment. This article starts with the complete setup of the local development environment, WNMP, and details the configuration methods for each essential component required for development, laying a solid foundation for developers. Then, through the explanation of key files needed for theme development, it provides a structured reference for custom theme design. In the debugging and testing phase, we explored commonly used debugging tools and testing workflows, helping developers promptly identify and fix potential issues during development. Regarding data security during the development and testing stages, this article focuses on two efficient and feasible backup and recovery solutions, satisfying the needs of individual developers for flexible manual backups while also providing automated backup strategies suitable for collaborative environments, minimizing risks caused by accidental operations or system failures. Through the entire development lifecycle process, we believe that both individual developers and team collaborators can establish a clear, efficient, and secure WordPress development workflow. In future projects, this complete set of development and deployment guidelines will serve as a solid foundation for continuous optimization and steady progress. We hope that every detail compiled in this article will inspire and assist you in your WordPress development practice.<\/p>\n\n\n\n<p class=\"translation-block\">Finally, a special recommendation for the company where the author works \u2013 <strong>Shenzhen Logic Digital Technology Co., Ltd.<\/strong> Logic Digital Technology focuses on in-depth development within the global WordPress ecosystem, dedicated to providing one-stop <strong><a href=\"https:\/\/www.szlogic.net\/en\/\" data-type=\"link\" data-id=\"https:\/\/www.szlogic.net\/\" target=\"_blank\" rel=\"noreferrer noopener\">WordPress solutions<\/a><\/strong> for businesses and individual clients. Our services cover a wide range of areas, including <strong><a href=\"https:\/\/www.szlogic.net\/en\/web-design\/\" data-type=\"link\" data-id=\"https:\/\/www.szlogic.net\/web-design\/\" target=\"_blank\" rel=\"noreferrer noopener\">WordPress website design and development<\/a><\/strong>, plugin custom development, theme programming development, and system integration. With rich development experience and technical expertise, we are capable of tailoring efficient, stable, and scalable WordPress projects for clients of different sizes and needs. If you have any customized requirements during the development, functionality extension, or system deployment of WordPress projects, feel free to contact the Shenzhen Logic Digital Technology team. We will provide strong support for your digital development with professional services and innovative technology.<\/p>\n\n\n\n<p><strong>This article is copyrighted by  Logic Digital Technology (SZLOGIC) . Personal sharing and learning are welcome. Unauthorized use for any commercial purposes or reproduction of this article is strictly prohibited.<\/strong><\/p>","protected":false},"excerpt":{"rendered":"<p>WordPress\u5f00\u53d1\uff1a\u751f\u4ea7\u73af\u5883\u90e8\u7f72\u4e0e\u8c03\u8bd5\u53ca\u6570\u636e\u5907\u4efd\u6307\u5357 \u5728\u73b0\u4ee3\u7f51\u7ad9\u5efa\u8bbe\u9886\u57df\uff0cWordPress\u4ee5\u5176\u7075\u6d3b\u6027\u4e0e\u5f3a [&hellip;]<\/p>","protected":false},"author":1,"featured_media":22856,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"site-sidebar-layout":"default","site-content-layout":"","ast-site-content-layout":"default","site-content-style":"default","site-sidebar-style":"default","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","ast-disable-related-posts":"","theme-transparent-header-meta":"","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","astra-migrate-meta-layouts":"default","ast-page-background-enabled":"default","ast-page-background-meta":{"desktop":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"ast-content-background-meta":{"desktop":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"footnotes":""},"categories":[87],"tags":[],"class_list":["post-22853","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-wordpress"],"acf":[],"_links":{"self":[{"href":"https:\/\/www.szlogic.net\/en\/wp-json\/wp\/v2\/posts\/22853","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.szlogic.net\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.szlogic.net\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.szlogic.net\/en\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.szlogic.net\/en\/wp-json\/wp\/v2\/comments?post=22853"}],"version-history":[{"count":60,"href":"https:\/\/www.szlogic.net\/en\/wp-json\/wp\/v2\/posts\/22853\/revisions"}],"predecessor-version":[{"id":22966,"href":"https:\/\/www.szlogic.net\/en\/wp-json\/wp\/v2\/posts\/22853\/revisions\/22966"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.szlogic.net\/en\/wp-json\/wp\/v2\/media\/22856"}],"wp:attachment":[{"href":"https:\/\/www.szlogic.net\/en\/wp-json\/wp\/v2\/media?parent=22853"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.szlogic.net\/en\/wp-json\/wp\/v2\/categories?post=22853"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.szlogic.net\/en\/wp-json\/wp\/v2\/tags?post=22853"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}