admin管理员组文章数量:1291174
I have background in programming (I am an electrical engineer and have become familiar with numerous languages over the years); however, I only starting working with wordpress and backend web development in the past few weeks.
I taught myself php/html/css over the past two weekends... built a plug in, made custom page types, etc. Now working on building a theme. But even as I get deeper into how WP and all the other applications come in to play, there is one aspect I can't seem to understand even with all the research I have done.
How exactly does WP work, fundamentally, in conjunction with a web server?
I know WP is a CMS application that essentially is acting as an admin GUI to aid in building websites/storing data without a lot of coding knowledge. I know WP stores/pulls info from a database through MySQL, provides 'core' functions for developers to access that data, etc. I understand the loop and how the static (HTML/CSS) and dynamic(JS) portions of the site are built uses php and the file structure + content. I get the web server processes a page request and pulls the static/dynamic content for the site.
But how is a web server communicating with WP? Does apache only talk to WP or does it communicate with the database/file structure directly? It seems that the database/meta data is stored by WP so at some point apache must have to pull from WP... And to add to my confusion, I host my files with dream host which is also a web server but seems to have some components of apache?
What I am not understanding? Any insight would be greatly appreciated!
I have background in programming (I am an electrical engineer and have become familiar with numerous languages over the years); however, I only starting working with wordpress and backend web development in the past few weeks.
I taught myself php/html/css over the past two weekends... built a plug in, made custom page types, etc. Now working on building a theme. But even as I get deeper into how WP and all the other applications come in to play, there is one aspect I can't seem to understand even with all the research I have done.
How exactly does WP work, fundamentally, in conjunction with a web server?
I know WP is a CMS application that essentially is acting as an admin GUI to aid in building websites/storing data without a lot of coding knowledge. I know WP stores/pulls info from a database through MySQL, provides 'core' functions for developers to access that data, etc. I understand the loop and how the static (HTML/CSS) and dynamic(JS) portions of the site are built uses php and the file structure + content. I get the web server processes a page request and pulls the static/dynamic content for the site.
But how is a web server communicating with WP? Does apache only talk to WP or does it communicate with the database/file structure directly? It seems that the database/meta data is stored by WP so at some point apache must have to pull from WP... And to add to my confusion, I host my files with dream host which is also a web server but seems to have some components of apache?
What I am not understanding? Any insight would be greatly appreciated!
Share Improve this question edited Nov 6, 2017 at 10:14 fuxia♦ 107k38 gold badges255 silver badges459 bronze badges asked Nov 6, 2017 at 6:36 tortor 11 bronze badge 1- Also thought that maybe apache is just hosting WP content such as the database with meta data/input to widgets/etc... and then dreamhost (in my case) is storing the files/themes/custom page php scripts/etc.?? – tor Commented Nov 6, 2017 at 6:47
2 Answers
Reset to default 2Apache only runs the index.php of WordPress, and serves static files (images, css, js etc). WP does all the rest, including parsing the request to find out what content to show the user. Apache does not (and needs not) know that there is communication with a data base in PHP, and doesn't interact with that database itself at any point.
That's also why you don't necessarily need Apache in the equation, you could also use nginx or other webservers (as long as they offer a way to run php), or no external webserver at all and just use php's internal webserver (though that's mostly for development, idk how well this holds up in production).
I liked the Question but it seems to me Tor is confusing between Site hosting and a CMS (content Management System)?!
- Dreamhost is a "WebSite hosting company" that provides Servers (VMs) to Web enabled applications like CMS and others Joomla, etc. (May be they only support WP?)
- Wordpress (WP) is a Web enabled multi-tier Client-Server application that consists of 3 Main independent Components working together to implement a CMS. The 3 Components are: 2.1 a Webserver (Apache, ...) that supports http/https Protocols. Gets users requests and pass them on to WP. 2.2 WP is an PHP app that executes PhP Code to resolve User Requests. WP runs Php to interact with MySQL. 2.3 MySQL is an RDBMS where 1 of the Databases owned by WP Application is stored and contains WP Site Content used to resolve Site Users' requests. That's my understanding of this enchilada!
本文标签: phpHow does WP work in conjunction with a web server
版权声明:本文标题:php - How does WP work in conjunction with a web server? 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1741496587a2381862.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论