Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

WordPress

Jeremy Frimond
Jeremy Frimond
14,470 Points

Joining Databases with PHP in Wordpress

I finished the course, "Using PHP with mySQL". Can all the information in that lesson be applied to working with Wordpress or does Wordpress require you to speak to your database using Hooks?

Randy Hoyt, Andrew Chalkley , or Treehousers?

1 Answer

Good question. l would say more or less but then wordpress does that bit of creating the tables for you and if you view your wp-config.php file and youe databse you would get a better understanding of what l mean. Wordpress is clever in such a way that after creating a database for it on your phpMYadmin, on installation it creates all the tables you need for the software. so you won't need to create them. It then adds on when you install plugins and add new users.Creating extra tables can break your wordpress. Now when you would on remote wordpress projects you can use the knowledge from the video to write switch and if states to point the wp-config file to your local server and also query the mysql when you import the remote database for your wordpress project.

l am a junior developer and trust me this has been very helpful to me.

Jeremy Frimond
Jeremy Frimond
14,470 Points

Kelvin Atawura thanks for the reply. this definitely gets me understanding the right direction.

So if I were to create and code a database in SQL then uploaded it to phpMYadmin, then run a wordpress install on a server (say blue host, godaddy, etc) and enter all the particular database information into the wp-config.php file that could break wordpress?

I am unfamiliar with remote wordpress project? Do you have any web searches that could point me further in the right direction, in order to get a better understanding of what you mean?

thanks again