Tag Info

Hot answers tagged

6

You don't need to add robots.txt file to the root of your site. robots.txt file is generated in real time, when you visit http://mysite.com/robots.txt. The function, responsible for creation of this file, is do_robots. If you wish to add your own directives, just write your hook for robots_txt filter, like this: add_filter( 'robots_txt', ...


5

It's a very loaded question, I'll try my best here, keep in mind it's 4am, so I'm just giving you highlights, not detailed explanations. Linux I'm assuming you're using a recent version of Ubuntu Change the default SSH port from 22, to something else (/etc/ssh/sshd_config). Either enable AllowGroups or AllowUser in the sshd_config, Install fail2ban ...


4

To map your domains, you can consider to use the WordPress MU Domain Mapping plugin which works with wordpress 3.0 as well. Otto has a tutorial online: WordPress 3.0: Multisite Domain Mapping Tutorial Next to that Import/Export should mainly do the job to transfer the sites.


4

To expand on duncmc's answer, Install WordPress in the root directory of your site. Then log in to the WP Admin, go to Settings > Reading and specify a static page for the front page of your site. and Tnorthcutt's answer, you also need to specify which page you want blog posts to show up on. That's done on the same Settings -> Reading page: ...


4

There might be hardcoded links in the theme; download it and do a multifile search with a text editor. Editing the text dump destroys serialized data; see another Q/A here: Why is my database import losing text widget data? To correctly change URLs in the database, use the queires below in phpmyadmin for WordPress. You will also need to change URLs in the ...


4

WordPress MU uses one database and each blog gets his own tables with the blog id in the prefix, so once you install a network installation your database should have these tables: wp_1_categories wp_1_comments wp_1_link2cat wp_1_links wp_1_options wp_1_post2cat wp_1_postmeta wp_1_posts wp_blogs wp_blog_versions wp_registration_log wp_signups wp_site ...


4

You can do it using Widget Context plugin or Widget Logic plugin. They work fine. I prefer Widget Context because it has more flexibility.


4

I use Dropbox as well, but not directly linked as the Dropbox folder path could differ from install to install. My Dropbox just is the root of my bare git repository. Simplified... When I start coding, I just add a new folder to my Dropbox and --bare init it. // Inside your Dropbox/webdev/themes folder for e.g. git --bare init Then inside your new Theme ...


3

wp_localize_script() calls the method localize() on the global variable $wp_scripts. We can set this variable to an instance of a child class of WP_Scripts: class Filterable_Scripts extends WP_Scripts { function localize( $handle, $object_name, $l10n ) { $l10n = apply_filters( 'script_l10n', $l10n ); return parent::localize($handle, ...


3

What permissions should I set on each of wp folders? Users will need to upload various assets (images, pdfs, office docs, audio, video). I found this article here that seems helpful, but would like to get some input from folks having done this? This will be the same as any other web server. Whatever user happens to be running the web server need ...


3

What about using something simple like a plugin. I'm using Widgets Controller and it's a good one. A plugin that give you control for show or hide widgets on WordPress Categories, Posts and Pages.


3

First of all, in order for Wordpress to generate a robots.txt for you you must be using a non-default permalink structure. Make sure you've selected an option in the Settings > Permalinks menu. Also, if a robots.txt file exists at your root directory it will override the setting in Wordpress. It looks like you already have a robots.txt file and that is the ...


3

If you are using a twentyten/eleven theme, they hardcode the pingback meta tag into the head.php file. Remove that line or use your own theme. Also, and maybe it's only in multisite, but the X-Pingback header is sent along with the xmlrpc endpoint url as well. Removed with the following: /** * Remove the X-Pingback header, since pingbacks are disabled */ ...


3

Does Wordpress core has this function defined somewhere? While I haven't used it, you are probably looking for wp_salt or wp_generate_password. wp_salt is located in wp-includes/pluggable.php. can these salts be generated randomly Yes, of course. are there any specific rules for creating them There is no specific rule. The generic rule is to ...


3

You should make a plugin, that way it is portable to any theme. Generally speaking people need to stop filling up functions.php or theme files with code that is better suited for scalability and flexibility, aka a plugin.


3

Well, someone has to be hosting it, so I recommend tracking them down. I've taken the liberty of doing this for you (using WhoIsHostingThis?). Your host is IX Web Hosting, contact their customer support and see if you can either get them to do the upgrade for you or, preferably, get them to give you admin access to your site.


3

Based on your needs, yes: you should probably be using a Network (WordPress with MultiSite enabled). All network sites run the same version of WordPress Each network site can activate its own Plugins. You can explicitly allow each site to manage its own Plugins. Each network site can have access to different Themes (though you will have to manage access to ...


3

that Wordpress error message is probably misleading. Wordpress looks for the domain name in $_SERVER['HTTP_HOST'] (PHP Manual) and if it contains a port number (separated with : as usual like http://example.com:444/) it will only accept two variants: port 80 an port 443. I assume that in your varnish configuration other ports are given and so you bump into ...


3

It's best to just log errors to the server and then use bash or a server script that supports email and error analysis (instead of PHP). There are lots of log file tools out there, simple ones like Logwatch, Swatch, Octopussy, or more complex ones like Nagios. For errors which are triggered using WP_Error you can write an email alert or log function right ...


3

If you want sections in a subdomain and in subdirectories, use a multi-site installation. See Create a Network and our tag multi-site. Then you set the the blog and the shop as separate sites, and the portfolio as a custom post type or as a regular page in the main blog.


2

Did you get clean copy of WordPress for reinstall (like went and downloaded from wordpres.org)? That line should be following (SVN) require('./wp-blog-header.php'); And it absolutely should not be edited since it is part of WordPress core.


2

At the risk of not answering the question (which Vid did quite well), may I suggest that you switch to a VPS host that offers to do the system administration for you (usually at no charge). I'm thinking of http://hub.org specifically. Marc (the guy who runs it, and one of the original four who created PostgreSQL) is the best system admin I've ever come ...


2

I found a fix here: http://core.trac.wordpress.org/ticket/15936 You basically need to modify wp-includes/ms-settings.php like this (remove '-' lines; add the '+' line): @@ -26,18 +26,8 @@ if ( !isset( $current_site ) || !isset( $current_blog ) ) { + $_SERVER['HTTP_HOST'] = preg_replace( '|:\d+$|', '', $_SERVER['HTTP_HOST'] ); $domain = ...


2

blogs.dir was the way to handle specific blog plugins and themes when it was WordPress-MU but since version 3 came out and the WordPress-MU was integrated into WordPress Core and introduced WordPress Multisite, that's no longer the story. WordPress Handles the creation of the new blogs/sites in the database and mainly in the background so you won't see too ...


2

Goto Appearance -> Menus -> Create a new menu -> Add your link as custom link


2

According to what I read it is because of an odd implementation of that function, apparently the number is used to add a Limit statement to the SQL that is used to get the pages. Then it applies the child_of requirement after retrieving the data from the database. So if you limit the query to 3 chances are you will not get any results that are also a ...


2

Not exactly what you are asking for, but very close. There is a concept of 'dropin' plugins that exists primarily to override or add to core functions The dropins will always load. So one ftp's up wordpress including whatever plugin files you want that will create your default environment. These should be in the top level wp_content folder. I have one ...


2

Add the following to wp_config.php: define( 'WP_DEBUG', true ); Reset the Plugins folder Revert to the default Theme (currently Twenty Eleven), using a similar method to the Plugin-reset step (just be sure that the only Theme available in /wp-content/themes/ is twenty-eleven) If your site is restored, great! If not, you likely have some sort of server or ...


2

The problem was that somewhere AllowOverride was set to None, but I don't know where that httpd.conf file was. I set it through some GUI tool that comes on the Mac. Apparently the file I was trying to edit was not the one that was being used. Thanks for your help, Pothi and JMa.


2

Although WordPress MU requires just a single database, as seen on WordPress Codex, you can always use different databases if you prefer to. Plugins such as Multi-DB allow you to do so, and although this wouldn't be much needed for a small-medium network, it would be interesting for large setups.



Only top voted, non community-wiki answers of a minimum length are eligible