The requested URL /about was not found on this server

If all above point not work. Then try this one. I tried it. It’s working for me. Go /etc/httpd/conf/httpd.conf. Change the AllowOverride None to AllowOverride All. Restart the apache server. UPDATE 2017 For new versions of apache the file is called apache2.conf So to access the file, type sudo nano /etc/apache2/apache2.conf and change the correspondent … Read more

WooCommerce: Finding the products in database

Update 2020 Products are located mainly in the following tables: wp_posts table with post_type like product (or product_variation), wp_postmeta table with post_id as relational index (the product ID). wp_wc_product_meta_lookup table with product_id as relational index (the post ID) | Allow fast queries on specific product data (since WooCommerce 3.7) wp_wc_order_product_lookuptable with product_id as relational index … Read more

WordPress Get the Page ID outside the loop

If you’re using pretty permalinks, get_query_var(‘page_id’) won’t work. Instead, get the queried object ID from the global $wp_query: // Since 3.1 – recommended! $page_object = get_queried_object(); $page_id = get_queried_object_id(); // “Dirty” pre 3.1 global $wp_query; $page_object = $wp_query->get_queried_object(); $page_id = $wp_query->get_queried_object_id();

WordPress filter to modify final html output

WordPress doesn’t have a “final output” filter, but you can hack together one. The below example resides within a “Must Use” plugin I’ve created for a project. Note: I haven’t tested with any plugins that might make use of the “shutdown” action. The plugin works by iterating through all the open buffer levels, closing them … Read more

Where is the post featured image link stored in the WordPress database?

The featured image ID is stored in wp_postmeta with a meta_key called _thumbnail_id. Example: ╔═════════╦═════════╦═══════════════╦═══════════╗ ║ meta_id ║ post_id ║ meta_key ║ meta_value║ ╠═════════╬═════════╬═══════════════╬═══════════╣ ║ 200 ║ 4 ║ _thumbnail_id ║ 48 ║ ╚═════════╩═════════╩═══════════════╩═══════════╝ The actual thumbnail link is then contained in wp_posts with a post_type of attachment. Example: ╔════╦════════════╦═════════════════════════════════════════════════════╗ ║ ID ║ post_type ║ … Read more

WordPress REST API (wp-api) 404 Error: Cannot access the WordPress REST API

UPDATED NEW WAY I also faced similar problem in a local project. I used index.php after my project url and it worked. http://localhost/myproject/index.php/wp-json/wp/v2/posts If it displays a 404 error then update permalinks first (see “Paged Navigation Doesn’t Work” section If it works, maybe you need to enable mod_rewrite, on ubuntu: a2enmod rewrite sudo service apache2 … Read more