Tag Info

Hot answers tagged

15

Short answer: Plugins do not modify existing files, they hook into WordPress via an exposed API. Plugins can modify database schema. Plugins don't have to uninstall cleanly. Plugin Hooks Plugins hook into WordPress at specific point exposed by the WordPress core. http://codex.wordpress.org/Plugin_API As an example, the function get_option() reads a ...


14

As I mentioned I was going to be start working on this need immediately so I'm making headway. Given that I'm knocking these down I figured it's best to start posting them. Still, if someone else can/will post (some of) the parts I haven't done I'll be happy to let you copy whatever I'd done you haven't and select your answer as the best answer. Until then ...


8

01 Database Security 01.01 change your database prefix during install or after install this is security by obscurity but helps with automated scripts that could run over all databases to inject bad code in your content like scripts, iframes or display: bits 01.02 install a database backup plugin to automate the backup e.g. ...


8

Sure. wp_install_defaults() is a pluggable function. (As are wp_new_blog_notification() and wp_upgrade(), in case you ever need to override those too.) # in wp-config.php if ( defined('WP_INSTALLING') && WP_INSTALLING ) { include_once dirname(__FILE__) . '/wp-content/install.php'; } # in wp-content/install.php function ...


6

Go through each plugin file and remove the plugin header. Create a loader.php file. Something like this: <?php /* Plugin Name: Combined Plugin Description: Contains plugin a, plugin b and plugin c */ include dirname(__FILE__) . '/plugin-a.php'; include dirname(__FILE__) . '/plugin-b.php'; include dirname(__FILE__) . '/plugin-c.php';


6

When the installer runs it calls wp_install(), that in turn calls populate_options() defined in wp-admin/includes/schema.php, which runs the following.. if ( !__get_option('home') ) update_option('home', $guessurl); Prior to that $guessurl is defined by.. $guessurl = wp_guess_url(); The guess URL function is defined in wp-includes/functions.php and ...


5

The code you posted is to have multiple wp-config.php-style wordpress configuration files with one codebase. the configuration is then based on the domain name. imagine the localserver is listening on http://localhost.localdomain/ (no idea which one is the default with ubuntu), then the configuration file would be: ...


5

No, there is no security risk. Both files do sanity checks before anything happens. If WordPress is already installed: install-helper.php returns just a blank page. install.php says WordPress is installed and you should log in: You can forbid access to both files with a simple rule in your .htaccess above the permalink rules: RedirectMatch Permanent ...


4

Should I host on my Linux hosting account or Windows Hosting Account? Is there any pro/cons one over other? It's a matter of preference and know-how. Choose one you find easier working on. If you are new to both, I'd suggest going with Linux — as most tutorials and docs on the web assume that you are on a Linux box. You can't go wrong with either, and ...


4

Searching for another thing, just stumbled upon this gem by @anmari :) You have to put a Dropin plugin at the root of wp-content. Should be named install.php and contain a new version of the pluggable function wp_install_defaults. I used this gist for testing. And the only modification from the original function is the default category name and slug. ...


4

Have you considered setting your main site to a multisite setup? This would allow you to use the same wordpress files from the root and serve a wordpress site under the /seperatesite/ directory without the need for duplicating files. take a look at: http://codex.wordpress.org/Create_A_Network If you need any specific help regarding setting this up then ...


4

Pam, It sounds like you are facing some major challenges, but I would highly recommend not messing with the table prefix. Doing so will lead to a series of problems, which will require hack after hack to remedy leaving you with a substantial mess of a WordPress installation. There are some other things you can do to help solve issues with slow queries. ...


4

In theory, you could rename the file and change the rewrite rule accordingly. Assuming you rename it to wp-index.php, it would look something like this: <IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /wp-index.php [L] </IfModule> There are a few ...


4

Given the way that Linux and Windows are licensed, using Linux would cut on the OS licensing costs, and Linux would make a better use of the CPU as you would only load the modules and process you need, with greater flexibility than Windows. Also, you can run a server-only Linux, which is not possible under Windows, as well as running a headless computer, ...


4

To always get latest plugin take for example my plugin: http://wordpress.org/extend/plugins/wordpress-file-monitor-plus/ the download link for the latest is: http://downloads.wordpress.org/plugin/wordpress-file-monitor-plus.1.1.zip but if you remove the version from the download link you always get the latest version: ...


4

WordPress Codex has quite extensive installation instructions. I see there's a .zip file and a .tar.gz file -- which should I use? No difference. Archive format is merely for convenience, contents are the same. I want the site to be at http not at www., but I do want either the site to also be visible at www. or for the www. to redirect to http -- ...


4

To answer your first question, in mosts hosts the www and public_html folders are the same, one just links to the other. To make things simple, start with the public_html folder. There is usually what is called a symlink between the two, pretty much like an alias or a shortcut. Now for the second question on moving the site, perform approximately the ...


3

Depends on your business needs. If you're running it for a personal blog or a small site then stay away from suspicious plugins and hosting providers and you'll be fine. There are some good security/backup plugins which tend to sometimes work. The best advice though is "stay updated" ;) If you're doing something bigger then go for VaultPress (not free). If ...


3

Links: http://codex.wordpress.org/Hardening_WordPress http://perishablepress.com/press/tag/security/ (lots of great articles) http://www.wpsecure.net/secure-wordpress/


3

I just did this on a client site. I set up my rules like this: RewriteEngine on RewriteCond %{HTTP_HOST} ^(.*)fsdegrees.com [NC] RewriteRule ^(.*)$ http://www.56degrees.co.uk/$1 [R=301,L] The first rule checks the incoming domain and verifies that it is the old domain. The second sends a 301 redirect and visitors are sent to the corresponding page on the ...


3

By "install" your widget, I'm assuming you mean "automatically add the new widget to the sidebar for your user after the plugin gets 'activated'". (Because if you activate the plugin, which also contains a widget, your widget should be visible in the widgets area immediately, without any more work needed). Jordan Bosch has a great write-up on how to create ...


3

You can use the following code to dump the HTTP Api response, will help you figure out the cause of error. function dump_http_api_response($response, $type="", $transport=null ) { if ( $type == "response" ) var_dump ( $response ); } add_action('http_api_debug', 'dump_http_api_response', 1, 3); Example Output: object(WP_Error)#15 (2) { ...


3

Yes. There is a script called easywp.php You upload it to your server and run it. it will install wordpress for you (i.e. download the .gz file, open it, etc ...) Another option is to download wordpress to your server using wget and ssh. you can do that using the command: wget http://wordpress.org/latest.zip if you want that wordpress install in Hebrew: ...


3

Using the wget command is a very quick way of uploading WordPress files to your server but an even "quicker" way would be to install using subversion. The main benefit to using subversion is that it is easier to update to new versions using the ssh svn commands. To install WordPress using svn: Create the directory you would like WordPress to reside in or ...


3

Plugins in WordPress do what the code says. To answer specifically to your questions, They shouldn't, but there's nothing stopping them from modifying core files. They are allowed to fully interface with the database in any way that WordPress itself can. WordPress doesn't make sure that a plugin uninstall doesn't destroy the whole installation. If a plugin ...


3

If you're manually installing a plugin, you need to disable and delete the old version. However, WordPress does allow you to update your plugin programatically. If your plugin is hosted on the WordPress.org repository, it will prompt the users to install updates for you. You've likely seen this with Akismet and other plugins already. If your plugin isn't ...


3

The article you linked to covers everything you need to know. I will just clarify what you do not understand and what is outdated. Site Redirect The domain mapping is done through wordpress.com to do a 301 direct, which tells search engines that you have moved permanently to a new address. It is outdated now and superseded with the site redirect upgrade ...


3

This is more of a system configuration question, but still ... On the server, everything is locked down based on users and user permissions. You are a user. Your FTP account is a user. Your root account is a user. WordPress itself is a user. So while you as a user might have write permissions for the WordPress directories (which is why you can manually ...


3

WordPress already has this available under Tools > Export. You can export all of your posts, comments, authors, etc. into an XML file which you can them Import into a new (or not new) installation. I believe this has been part of the core since WordPress 2.1.



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