EzDevInfo.com

wordpress interview questions

Top wordpress frequently asked interview questions

What are the Wordpress alternatives for Ruby on Rails? [closed]

What are the Wordpress alternatives for Ruby on Rails? How do they compare to Wordpress?


Source: (StackOverflow)

Correct file permissions for WordPress

I've had a look over here but didn't find any details on the best file permissions. I also took a look at some of WordPress's form's questions over here too but anybody that suggests 777 obviously needs a little lesson in security.

In short my question is this. What permissions should I have for the following:

  1. root folder storing all the WordPress content
  2. wp-admin
  3. wp-content
  4. wp-includes

and then all the files in each of those folders?


Source: (StackOverflow)

Advertisements

Can I install/update WordPress plugins without providing FTP access?

I am using WordPress on my live server which only uses SFTP using an SSH key.

I want to install and upgrade plugins, but it appears that you are required to enter your FTP login to install the plugins. Is there a way to install and upgrade plugins by manually uploading the files instead of having WordPress handle the entire process?


Source: (StackOverflow)

Create a folder if it doesn't already exist

I've run into a few cases with WordPress installs with Bluehost where I've encountered errors with my WordPress theme because the uploads folder wp-content/uploads was not present.

Apparently the Bluehost cPanel WP installer does not create this folder, though HostGator does.

So I need to add code to my theme that checks for the folder and creates it otherwise.


Source: (StackOverflow)

#1273 - Unknown collation: 'utf8mb4_unicode_ci' Cpanel

I have a wordpress database on my local machine that I want to transfer to a hosted phpMyAdmin on Cpanel. However when I try to import the database into the environment, I keep getting this error

#1273 - Unknown collation: 'utf8mb4_unicode_ci' 

I have tried to google around and the only solution I can find is this one phpmysql error - #1273 - #1273 - Unknown collation: 'utf8mb4_general_ci' which as by now isn't much help. I have tried clearing the cookies but it still won't work. Please help!


Source: (StackOverflow)

Is there any CMS better than WordPress or should I roll my own? [closed]

I'm developing a small business website and want to give some control over content to the client but also allow myself control over the outputted code. Indeed allow the user to fill in the content gaps while not creating havoc.

I'm leaning towards WordPress rather than reinventing the wheel in asp.net, which would be my code of choice, or possibly just html.

Any recommendations either way? An alternative CMS maybe or some robust but productive framework? (interested in mention of python frameworks)


Source: (StackOverflow)

How to get WordPress post featured image url

I am using a this function to get the featured images

<a rel='nofollow' href="#" rel="prettyPhoto">
<?php the_post_thumbnail('thumbnail'); ?>
</a>

now i want to get the full featured image on click on anchor tag for which i need a featured image url in

<a rel='nofollow' href="here" rel="prettyPhoto">

please help


Source: (StackOverflow)

Wordpress Get the Page ID outside the loop

I want to get the page ID before starting the loop in Wordpress. I am using

$page = get_query_var('page_id');

Apparently, it returns nothing.

I just want to check a page for its ID and add a class to <body> tag based on it.


Source: (StackOverflow)

Why is WordPress considered to be poorly programmed? [closed]

I'm not a fan of PHP or spaghetti code, or anything like that, but in my experience WordPress works amazingly well, it's well organized, and I've never come across any hard to understand code. The documentation is incredibly thorough, any security flaws are fixed within seconds, and it "just works". Not to mention that it does EVERYTHING, and it has an awesome plug-in system. Oh, and "the Loop" is awesome. I've never had any problems doing simple modifications to the code or to themes.

Can you guys give any specific examples of what you don't like about it, or what you would have programmed differently? I just don't understand why it gets such a bad rap. I wish my own software worked as well and had as many features and looked as nice.


Source: (StackOverflow)

Is WordPress MVC compliant? [closed]

Some people consider WordPress a blogging platform, some think of it as a CMS, some refer to WordPress as a development framework. Whichever it is, the question still remains. Is WordPress MVC compliant?

I've read the forums and somebody asked about MVC about three years ago. There were some positive answers, and some negative ones. While nobody knows exactly what MVC is and everybody thinks of it in their own way, there's still a general concept that's present in all the discussions.

I have little experience with MVC frameworks and there doesn't seem to be anything about the framework itself. Most of the MVC is done by the programmer, am I right? Now, going back to WordPress, could we consider the core rewrite engine (WP_Rewrite) the controller? Queries & plugin logic as the model? And themes as the view? Or am I getting it all wrong?

Thanks ;)


Source: (StackOverflow)

Strange iframe added into body tags called rufous-sandbox

I'm working on a local wordpress site, and for some reason theres an iframe added just after the opening body tag which makes the body to drop down about 20px.

Google only returned 1 relevant result when searching for it, and what I read there didn't help much. It can be found here

As I said on the wordpress site (user AMG999222) Theres no plugins installed on this site, and setting it to display: none; doesn't work.

Here's a screenshot from Chrome so you can see.

enter image description here


Source: (StackOverflow)

Wordpress 3.5 custom media upload for your theme options

Wordpress 3.5 has been released recently, I used the Wordpress Media Upload system via thickbox and window.send_to_editor for some options in my Wordpress theme (backgrounds, logos etc...).

But as you know Wordpress has integrated a new Media Manager, I wanted to used this new feature to upload images/files as custom fields. So I spent the morning to find a way to get the wished result.

I found with this solution, which can be useful for some of you. Thanks to give me your feedback on the code or any improvements you have in mind!

HTML Sample:

<a rel='nofollow' href="#" class="custom_media_upload">Upload</a>
<img class="custom_media_image" src="" />
<input class="custom_media_url" type="text" name="attachment_url" value="">
<input class="custom_media_id" type="text" name="attachment_id" value="">

jQuery Code:

$('.custom_media_upload').click(function() {

    var send_attachment_bkp = wp.media.editor.send.attachment;

    wp.media.editor.send.attachment = function(props, attachment) {

        $('.custom_media_image').attr('src', attachment.url);
        $('.custom_media_url').val(attachment.url);
        $('.custom_media_id').val(attachment.id);

        wp.media.editor.send.attachment = send_attachment_bkp;
    }

    wp.media.editor.open();

    return false;
});

If you want to see every settings contained in the attachment variable you can do a console.log(attachment) or alert(attachment).

Have a good day!


Source: (StackOverflow)

PHP Warning: POST Content-Length of 8978294 bytes exceeds the limit of 8388608 bytes in Unknown on line 0

I am getting this error when trying to upload an import on WordPress on my XAMPP local dev environment:

Warning: POST Content-Length of 8978294 bytes exceeds the limit of 8388608 bytes in Unknown on line 0

I changed the upload_max_filesize from 2M to 1000M, but that didn't seem to do anything.

Any ideas?


Source: (StackOverflow)

How do I add a simple jQuery script to WordPress?

I read the Codex and a few blog posts about using jQuery in WordPress, and its very frustrating. I've got as far as loading jQuery in functions.php file, but all of the guides out there are crappy because they assume you already have a ton of WordPress experience. For instance, they say that now that I'm loading jQuery through the functions.php file, now all I have to do is load my jQuery.

How exactly do I do this? What files, specifically, do I add code to? How exactly do I add it for a single WordPress page?


Source: (StackOverflow)

What type of hash does WordPress use?

What type of hash does WordPress use?
Here is an example of a WordPress hash:

$P$Bp.ZDNMM98mGNxCtHSkc1DqdRPXeoR.


Source: (StackOverflow)