Tag Info

New answers tagged

2

Check all credentials in wp-config.php. And don't forget about table prefix.


0

It sounds like you have multiple databases and that WordPress is not accessing the correct one. Check your wp-config.php file (in the base of your WordPress installation) and make sure that your database credentials, in particular DB_NAME, are set correctly. You may also need to create/grant access to a new database user. There's about a dozen different ...


0

This turned out to be a series of inaccuracies on my part. I'll post all the stuff I ran into in case anyone else has similar issues. I think this is about what happened: Everything was set up correct initially, but I changed www.mysite.no to localhost/var/www instead of just localhost. Then I changed to a fresh installation of Wordpress with a working ...


0

From the looks of it, you should be changing the pre-existing urls from /www.mypage.no to /localhost The /var/www is part of the file path normally (though i suppose you could potentially set the server up that way...), so more than likely wordpress thinks it is at /var/www relative to the web root instead of /. Don't forget to also change the two urls in ...


0

As long as you aren't passing out the plugin and other people don't have access to it, you should be fine. You might add something like the following to the top of the file just in case though: defined('ABSPATH') or die('Access denied'); That will simply make sure that the file is loaded via wordpress (e.g. the wordpress ABSPATH constant has been ...


0

You might want to take a look at CRED plugin and see if it gets you anywhere near what you need. I've worked with it back when it was three different plugins (Types, Views and Access). For as much as I can remember they used to keep a testing environment where you could take plugins for a spin in a clean site on their server before you bought it, you ...


0

Another, better, way to do this would be to do a couple of different things: Locate the filters that are running those queries in wordpress SEO and remove them Look at the data they are gathering to display in the list of posts and use the posts_join and posts_fields filters to add the data they are gathering via their individual queries into the query ...


0

Maybe this plugin comes close to what you want? https://wordpress.org/plugins/adminer/screenshots/ However, you can use something like Sequel Pro to connect to the database to build SQL queries.


0

Why do you want to go for a custom MYSQL database altogether? You can simply use custom post types for products. Please check http://codex.wordpress.org/Post_Types You can add images, custom fields such as review, ratings etc. There are many plugins that can help you create custom post types easily. https://wordpress.org/plugins/custom-post-type-ui/ ...


1

Although this is possible, it really is not viable. I've done a lot of research on this subject, but could not find a straight forward answer I went and had a look at the WP_Query class for a possible solution, and I came to the conclusion that what I was trying to accomplish would not be possible with a simple one or two liner code. PITFALLS To get the ...


0

One way to do this (and yes, it is ugly and hackish) is to create a custom page having a custom page template that draws out all of your posts and creates the proper admin url links for each one. For example: <?php /* Template Name: View Posts Quickly */ if ( !is_user_logged_in() ) { # Redirect the user or use wp_die('Permission denied') or throw a ...


0

Well it's really not good practise, but this depends on how you're accessing the other databases. For example, I have a server that hosts 10+ different Wordpress sites. I have two options for connecting to the databases: Use the root login in all my wp-config.php files as it's easier Create a user and logins associated with each database for each site ...


0

Your best bet would be to take DB and site backup and see if you can get it working on local server or any other server, if you do get it running the problem is with the way server probably changed some settings while upgrading. Also in the screenshot image isn't loaded, but can you open developer tools in your favorite browser and see what path is it ...


1

Short answer, no. WPDB is a class that's been around for a while (back when WP used to support PHP 4), and lacks a lot of features PHP5 drivers offer, including parameter binding. As you mentioned, wpdb::insert is the closest you can get to your original code: $wpdb->insert( 'importtest', array( 'id' => $ID, 'area' ...


2

Okay, this always seems to happen to me. I spend ages looking for an answer and finally decide to give up and post here and then one more search finds enough to solve it. Anyway, this is what worked for me: update wp_posts set post_content = replace(post_content, '[/tab] [tab title="1024x576"] <table class="screenshot-table">', '[tabby title="1024 ...


1

When getting user input to be stored on database, a good way to proceed is: Data validation: validate the data according whith the data you expect. For example: HTML string, number, email, URL, any text with no HTML, ect. Never trust on user input or client-side validation. You can make here also some sanitization, but it is not substitute of data ...



Top 50 recent answers are included