![]() Once you are connected to a database, you see a list of tables down the left hand side. If you manage multiple WordPress-based sites, you can connect to as many databases as you like – you just supply the above credentials for each one. You will have defined these when the database was first created during WordPress installation. These are NOT your WordPress login details. To connect to your WordPress database, you’ll need to know the database name, the username and password. If you have a Mac, I recommend that you use a free app called Sequel Pro However, PHPMyAdmin is not for the faint-hearted! So how do you access the database directly? Depending on your web host, you may be able to do it via your web host’s control panel, using a browser based tool called PHPMyAdmin. The result of this was that I was unable to login to the site’s Admin Control Panel nor was the site available for anyone else to see! I recently changed the theme on one of my sites and for whatever reason, the theme installation failed. I’ve also had several occasions where being able to access the database directly has been a life-saver. Again, I wanted this information stored in Excel. For each testimonial I needed the title, the text and the name of the person who submitted it. I needed a list of all the testimonials from the MacBites website. I wanted this information stored in an Excel file, one row for each post. For each post, I wanted the tutorial title, the date it was published and the URL. I needed a list of all the tutorials on The Excel Trainer (each tutorial is a post). Here’s a few examples of when I’ve done it: So when would you need to work directly with the database? Most of the time you create and manage your posts and blog/website configuration via the browser-based WordPress Control Panel. Plugin information is often stored in the Options table too, although sometimes the installation of the plugin creates itself creates other tables.Īs I said at the start of this post (yes, what you are reading right now is a post on this blog!), there’s often no need to access the database directly. The Options table stores all the configuration information for the database including the website URL, the Administrator’s usernames and passwords (these are encrypted) and the name of the theme that is being used. Each record stores the name and email address of the person who submitted the comment, the date the comment was submitted and the ID of the post that the comment relates to ![]() The Comments table stores comments that people have submitted to your blog via the comments form that appears at the bottom of each post. Examples include an About Me page and a Contact page Pages are static entries and are not listed by date. For a site such as MacBites, the show notes for each episode are individual posts. For example on a site that contains tutorials, such as The Excel Trainer, each tutorial is a separate post. A post is an individual entry in your blog/website. ![]() ![]() The Posts table stores the actual content of each post or page on your blog/website. I’m not going to go into detail about the entire database but to give you some idea: There are 11 tables in the WordPress database (your database may have more if you have installed certain plugins). Each column is known as a field and has a name to identify it. A table consists of rows and columns (think of it as looking like an Excel worksheet). The WordPress database consists of tables. However, when it comes to troubleshooting, having a basic understanding of it and being able to access it quickly and easily can save you time (and money) An average website or blog owner will probably never need to fiddle with the WordPress database.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |