Hot answers tagged

88

I gave this some more thought and given size of WP code base (including bundled libraries) it doesn't seem very realistic to compile such list by hand (and repeat it for every new version - meh). I looked up appropriate static code analysis tool - PHP_CompatInfo and after some tinkering generated following report of extensions used by core (version scanned ...


30

XAMPP is NOT cross-platform. There is XAMPP for Windows, XAMPP for Linux, for Mac and for Solaris, but each pack contains different pieces of software, runs differently with different performance, etc. (cross-platform means that you take the exact same piece of software and it runs the same way on different platforms ... like Azureus used to be: a jar that ...


26

The answer for this might be complicated and very long, as far as I know, there will also be some differences between servers & OS (IIS, Apache).. I can not say that the following list is a FULL list, but it includes some of those I know that are required : Curl and CurlSSL – Not sure it is REQUIRED but but much of the WordPress code will use it if it ...


16

I asked this question over a year ago, and during that time we've added more people to our team and developed a much larger number of sites in WordPress. I wanted to walk through our process in case it might help anyone else. Everything in Git This was something I was doing even as I asked the question, but it's good to call this point out. Using Git has ...


15

I figured it out! In my php.ini file I had to uncomment extension=php_gd2.dll, then it started working after I rebuilt the images I uploaded :) Thanks, Josh


14

I have just built a plugin that does this. It is not perfect but it do its job. You can find it in my Github: https://github.com/pontusab/wp-ftp-media-library So you need to change some things within the file on the row 28: /** * Change this to match your server * You only need to change the those with (*) * If marked with (-) its optional ...


13

(This is not intended to be an answer. Just some useful information. If you think this info is not useful, let me know, I'll simply delete it.) I think talking in terms of packages would be easier for newbies, but since packages vary from system to system, it's hard to cover all of them. As I have experience with Debian (& Debian-based distros), I'd ...


9

$_SERVER['REQUEST_URI'] will not be empty in WordPress, because it is filled in wp_fix_server_vars() (file wp-includes/load.php). This function is called in wp-settings.php before any plugin is loaded. So you can use it. But always escape the value. It is global and can be changed by any other code, so you cannot trust its value. A different case is ...


8

WordPress local development environment: Local development environments could apply to developing any type of application but there are some specific WordPress gotchas that could hinder your transition from local to dev. The goal of a local development environment is to mimic as close as possible the production environment and allow seamless transition. ...


8

If you want an easy way to verify if your server meets these requirements, there's now a handy WP-CLI ext command to do so. wp ext required shows all PHP extensions necessary to run WordPress, while wp ext recommended shows optional ones. wp ext check is a combination of both commands. These come in handy when you need a quick way to check the system ...


7

WebSockets use the websockets protocol: WS:/example.com/yourscript.js and open a synchronous connection - meaning the connection is held open and dedicated to the browser. httpd servers, like apache2 (used by most shared hosting providers) use the http protocol: http://example.com/yourscript.js and open an asynchronous connection - meaning that no ...


7

Caching the WordPress Menu also gives you a performance boost. Especially if you have a lot of Pages or a giant Menu Structure, this should be considered. Do it in 2 easy steps. At first, create a function that gets or creates the menu, instead of calling wp_nav_menu directly. function get_cached_menu( $menuargs ) { if ( !isset( $menuargs['menu'] ) ) {...


7

I've developed my WordPress environment checker. It is a simple class, runs on web SAPI or on CLI. This is the maintained version https://github.com/szepeviktor/debian-server-tools/blob/master/webserver/php-env-check.php <?php /** * Check PHP environment. * * Usage through a webserver * wget -q -O - "https://example.com/php-env-check.php"; echo *...


7

I guess you haven't taken a look at the file that is served for downloading, if so you would have seen this: <?php /** * Front to the WordPress application. This file doesn't do anything, but loads * wp-blog-header.php which does and tells WordPress to load the theme. * * @package WordPress */ /** * Tells WordPress to load the WordPress theme and ...


6

Without looking at your box to see exactly what's going on, here are some potential avenues of slowness: Potential Causes Apache Apache is usually configured in such a way that a single httpd process is always running in the background. When a request comes in over the wire, it spins up a new httpd process to handle the request. Once the request closes, ...


6

The WordPress Codex documentation on Installing WordPress and Editing Files give you pretty much all information you need. You will need a web server to test the code and changes. So you can either do this on your web server (assuming you have some sort of hosting package, because you mention 'upload'), or on your local machine. For easy setup, there is ...


5

This type of question is open ended to answer because it depends on many variables. The typical memory usage of bare WP usually starts at 15MB and scales up. What you can do is turn on debugging and install the Debug Bar plugin and it will show you the amount of memory you're using. In wp-config.php set define( 'WP_DEBUG', true ); Another plugin which ...


5

A reverse proxy could work, such as varnish or nginx. Using varnish as an example: backend blog { .host = "blog-server-ip"; } backend default { .host = "current-domain-ip"; } sub vcl_recv { if (req.rul ~ "^/blog/") { req.backend = blog; } }


4

Yes cou can change it by accessing the database of your wordpress. It's located in the wp_options table of your wp' database. You'll have to change two values; the siteurl (line 1) and the home (line 37). You can access it through the admin panel of your host and/or sometimes directly by typing in your browser the DB_HOST value you entered for the ...


4

I use xip.io for this. What is xip.io? xip.io is a magic domain name that provides wildcard DNS for any IP address. Say your LAN IP address is 10.0.0.1. Using xip.io, 10.0.0.1.xip.io resolves to 10.0.0.1 www.10.0.0.1.xip.io resolves to 10.0.0.1 mysite.10.0.0.1.xip.io resolves to 10.0.0.1 foo.bar.10.0.0.1.xip.io ...


4

Parts of WordPress use (s)FTP to transfer files. Updates, for example, use (s)FTP. Media uploads do not, at least not unless something has changed in 3.7. If you are connecting to an (s)FTP server you have to provide the credentials that that server needs. Your file permissions won't come into play until after that connection is made. There are constants ...


4

Yes, instead of installing WordPress at root-- example.com/-- you'd create the "programs", "sales", and "learning" directories on the server and install a seperate WordPress instance in each directory. There is nothing special you need to do to make this work. I think you may end up happier if you create a network, though. Multisite, while not always ...


4

I fixed this by running this command: cd /var/www/html/ sudo chown -Rv www-data:www-data * Changed ownership back to www-data instead of root. This article helped me: http://johnqunknown.me/fixing-wordpress-a-mini-tutorial/


3

In response to your update, in my opinion and based on the research I have done, that would be the very best option. Even better would be to create the front end plugin and create the external websocket service to talk with the plugins, and charge a fee for it so you can monetize your idea, if you want. You could even provide the source code for the ...


3

The objection that XAMPP is bloated--because it has a mail server, FTP server, etc.--might be answered by asking what you need. If you need most or all of those items, it's the full XAMPP for you. For just developing web pages, including PHP and MySQL, use XAMPP Lite. At different times I've found both to be very useful. I especially like that I can run ...


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 wouldn't worry too much about it - just download all databases and files. And if you're uploading them to the new server, change the wp-config files and run the following queries on the databases: UPDATE wp_options SET option_value = replace(option_value, 'http://www.example.com', 'http://www.newurl.com') WHERE option_name = 'home' OR option_name = '...


3

It may be a conflict between the internal option 'home' or 'siteurl' and the access per pure IP address. WordPress doesn’t use just any server name, there is some redundancy which may get in your way here. You can try to resolve that by two constants defined in your wp-config.php: define( 'WP_HOME', 'http://' . $_SERVER['HTTP_HOST'] ); // or // define( '...


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